rpm.yml 677 B

123456789101112131415161718192021222324252627282930
  1. ---
  2. - name: RPM | Determine if firewalld installed
  3. command: "rpm -q firewalld"
  4. register: s
  5. changed_when: false
  6. failed_when: false
  7. check_mode: no
  8. - name: RPM | Determine if firewalld enabled
  9. systemd:
  10. name: "firewalld"
  11. ignore_errors: true
  12. register: ss
  13. - name: Set the contiv_has_firewalld fact
  14. set_fact:
  15. contiv_has_firewalld: true
  16. when: s.rc == 0 and ss.status.ActiveState == 'active'
  17. - name: Determine if iptables-services installed
  18. command: "rpm -q iptables-services"
  19. register: s
  20. changed_when: false
  21. failed_when: false
  22. check_mode: no
  23. - name: Set the contiv_has_iptables fact
  24. set_fact:
  25. contiv_has_iptables: true
  26. when: s.rc == 0