--- | |
- name: Get installed packages list | |
package_facts: | |
manager: "auto" | |
- name: Stop and disable default OS firewall if exists | |
service: | |
name: "{{ firewall.package_name[ansible_facts.os_family] }}" | |
state: stopped | |
enabled: no | |
when: firewall.package_name[ansible_facts.os_family] in ansible_facts.packages | |
- name: Flush iptables | |
iptables: | |
flush: true |