blob: f406d9438b321de731f839bc3f2d84f690993b6c [file] [log] [blame]
Tomáš Levorab8883942018-12-19 15:34:21 +01001---
Bartek Grzybowski8bd90d92019-02-25 16:00:46 +01002- name: Get installed packages list
3 package_facts:
4 manager: "auto"
Tomáš Levorab8883942018-12-19 15:34:21 +01005
Bartek Grzybowski8bd90d92019-02-25 16:00:46 +01006- name: Stop and disable default OS firewall if exists
Tomáš Levorab8883942018-12-19 15:34:21 +01007 service:
Bartek Grzybowski8bd90d92019-02-25 16:00:46 +01008 name: "{{ firewall.package_name[ansible_facts.os_family] }}"
Tomáš Levorab8883942018-12-19 15:34:21 +01009 state: stopped
10 enabled: no
Bartek Grzybowski8bd90d92019-02-25 16:00:46 +010011 when: firewall.package_name[ansible_facts.os_family] in ansible_facts.packages
Tomáš Levorab8883942018-12-19 15:34:21 +010012
13- name: Flush iptables
14 iptables:
15 flush: true