Browse Source

Add ability to disable os_firewall

Jason DeTiberus 9 years ago
parent
commit
5a964c9cbd
2 changed files with 3 additions and 2 deletions
  1. 1 0
      roles/os_firewall/defaults/main.yml
  2. 2 2
      roles/os_firewall/tasks/main.yml

+ 1 - 0
roles/os_firewall/defaults/main.yml

@@ -1,2 +1,3 @@
 ---
+os_firewall_enabled: True
 os_firewall_use_firewalld: True

+ 2 - 2
roles/os_firewall/tasks/main.yml

@@ -1,6 +1,6 @@
 ---
 - include: firewall/firewalld.yml
-  when: os_firewall_use_firewalld
+  when: os_firewall_enabled | bool and os_firewall_use_firewalld | bool
 
 - include: firewall/iptables.yml
-  when: not os_firewall_use_firewalld
+  when: os_firewall_enabled | bool and not os_firewall_use_firewalld | bool