Преглед на файлове

Add ability to disable os_firewall

Jason DeTiberus преди 9 години
родител
ревизия
5a964c9cbd
променени са 2 файла, в които са добавени 3 реда и са изтрити 2 реда
  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