---
- name: RPM | Determine if firewalld installed
  command: "rpm -q firewalld"
  register: s
  changed_when: false
  failed_when: false
  check_mode: no

- name: Set the has_firewalld fact
  set_fact:
    has_firewalld: true
  when: s.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 has_iptables fact
  set_fact:
    has_iptables: true
  when: s.rc == 0
