blob: 5f1ab537089b6d72c8735e43f53ef6af9c3b351d [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
Samuli Silviusba1fa172019-03-24 13:32:44 +020016 changed_when: false # for idempotence