12345678910111213141516171819202122232425262728293031 |
- ---
- - name: RPM | Determine if firewalld installed
- command: "rpm -q firewalld"
- register: s
- changed_when: false
- failed_when: false
- check_mode: no
- - name: RPM | Determine if firewalld enabled
- command: "systemctl status firewalld.service"
- register: ss
- changed_when: false
- failed_when: false
- check_mode: no
- - name: Set the contiv_has_firewalld fact
- set_fact:
- contiv_has_firewalld: true
- when: s.rc == 0 and ss.rc == 0
- - name: Determine if iptables-services installed
- command: "rpm -q iptables-services"
- register: s
- changed_when: false
- failed_when: false
- check_mode: no
- - name: Set the contiv_has_iptables fact
- set_fact:
- contiv_has_iptables: true
- when: s.rc == 0
|