From d3062de6cf2e74ba6d6945e64e7f316cb4d83c7a Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 16 Sep 2023 14:21:33 +0200 Subject: [PATCH] Further fixes to firewall control --- personal_infra/playbooks/roles/deploy_ragent/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/personal_infra/playbooks/roles/deploy_ragent/tasks/main.yml b/personal_infra/playbooks/roles/deploy_ragent/tasks/main.yml index 38cacab..72bd5be 100644 --- a/personal_infra/playbooks/roles/deploy_ragent/tasks/main.yml +++ b/personal_infra/playbooks/roles/deploy_ragent/tasks/main.yml @@ -33,10 +33,10 @@ state: restarted - name: open firewall command: firewall-cmd --permanent --add-port=21488/tcp - when: ansible_os_family == "RedHat" and ansible_distribution_major_version in ("7", "8", "9") and ansible_virtualization_type != "lxc" and not network.disable_firewall + when: ansible_os_family == "RedHat" and ansible_distribution_major_version in ("7", "8", "9") and ansible_virtualization_type != "lxc" and not network.disable_firewall|default(False) - name: reload firewall command: firewall-cmd --reload - when: ansible_os_family == "RedHat" and ansible_distribution_major_version in ("7", "8", "9") and ansible_virtualization_type != "lxc" and not network.disable_firewall + when: ansible_os_family == "RedHat" and ansible_distribution_major_version in ("7", "8", "9") and ansible_virtualization_type != "lxc" and not network.disable_firewall|default(False) - name: force check community.general.nagios: action: forced_check -- 2.47.3