Tomáš Levora | b888394 | 2018-12-19 15:34:21 +0100 | [diff] [blame] | 1 | --- |
Bartek Grzybowski | 8bd90d9 | 2019-02-25 16:00:46 +0100 | [diff] [blame] | 2 | - name: Get installed packages list |
| 3 | package_facts: |
| 4 | manager: "auto" |
Tomáš Levora | b888394 | 2018-12-19 15:34:21 +0100 | [diff] [blame] | 5 | |
Bartek Grzybowski | 8bd90d9 | 2019-02-25 16:00:46 +0100 | [diff] [blame] | 6 | - name: Stop and disable default OS firewall if exists |
Tomáš Levora | b888394 | 2018-12-19 15:34:21 +0100 | [diff] [blame] | 7 | service: |
Bartek Grzybowski | 8bd90d9 | 2019-02-25 16:00:46 +0100 | [diff] [blame] | 8 | name: "{{ firewall.package_name[ansible_facts.os_family] }}" |
Tomáš Levora | b888394 | 2018-12-19 15:34:21 +0100 | [diff] [blame] | 9 | state: stopped |
| 10 | enabled: no |
Bartek Grzybowski | 8bd90d9 | 2019-02-25 16:00:46 +0100 | [diff] [blame] | 11 | when: firewall.package_name[ansible_facts.os_family] in ansible_facts.packages |
Tomáš Levora | b888394 | 2018-12-19 15:34:21 +0100 | [diff] [blame] | 12 | |
| 13 | - name: Flush iptables |
| 14 | iptables: |
| 15 | flush: true |
Samuli Silvius | ba1fa17 | 2019-03-24 13:32:44 +0200 | [diff] [blame] | 16 | changed_when: false # for idempotence |