blob: 9a8a2c10ca8d8efe5aef04e52b29d563d31f2e36 [file] [log] [blame]
Tomáš Levorab8883942018-12-19 15:34:21 +01001---
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