Tomáš Levora | b888394 | 2018-12-19 15:34:21 +0100 | [diff] [blame] | 1 | --- |
2 | - name: Check if firewalld is installed | ||||
3 | yum: | ||||
4 | list: firewalld | ||||
5 | disablerepo: "*" | ||||
6 | register: firewalld_check | ||||
7 | |||||
8 | - name: Stop and disable firewalld if exists | ||||
9 | service: | ||||
10 | name: firewalld | ||||
11 | state: stopped | ||||
12 | enabled: no | ||||
13 | when: firewalld_check.results|selectattr('yumstate', 'match', 'installed')|list|length != 0 | ||||
14 | |||||
15 | - name: Flush iptables | ||||
16 | iptables: | ||||
17 | flush: true |