Saltstack Official FirewallD Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
854B

  1. # == State: firewalld
  2. #
  3. # This state installs/runs firewalld.
  4. #
  5. {% if salt['pillar.get']('firewalld:enabled') %}
  6. include:
  7. - firewalld._config
  8. - firewalld._service
  9. - firewalld._zone
  10. # iptables service that comes with rhel/centos
  11. iptables:
  12. service:
  13. - disabled
  14. - enable: False
  15. ip6tables:
  16. service:
  17. - disabled
  18. - enable: False
  19. firewalld:
  20. pkg:
  21. - installed
  22. service:
  23. - running # ensure it's running
  24. - enable: True # start on boot
  25. - require:
  26. - pkg: firewalld
  27. - file: /etc/firewalld/firewalld.conf # require this file
  28. - service: iptables # ensure it's stopped
  29. - service: ip6tables # ensure it's stopped
  30. {% else %}
  31. firewalld:
  32. service:
  33. - dead # ensure it's not running
  34. - enable: False # don't start on boot
  35. {% endif %}