]> xn--ix-yja.es Git - alex.git/commitdiff
Further fixes to firewall control
authoralex <alex@pdp7.net>
Sat, 16 Sep 2023 12:21:33 +0000 (14:21 +0200)
committeralex <alex@pdp7.net>
Sat, 16 Sep 2023 12:21:33 +0000 (14:21 +0200)
personal_infra/playbooks/roles/deploy_ragent/tasks/main.yml

index 38cacab5fa624e1fb8bc7a39ade639b46a32bdcc..72bd5bed7efe4fcd9fc546b0f4a199afef026fa4 100644 (file)
     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