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.

32 line
827B

  1. # == State: firewalld._config
  2. #
  3. # This state configures firewalld.
  4. #
  5. {% from "firewalld/map.jinja" import firewalld with context %}
  6. directory_firewalld:
  7. file.directory: # make sure this is a directory
  8. - name: /etc/firewalld
  9. - user: root
  10. - group: root
  11. - mode: 750
  12. - require:
  13. - pkg: package_firewalld # make sure package is installed
  14. - listen_in:
  15. - module: service_firewalld # restart service
  16. config_firewalld:
  17. file.managed:
  18. - name: /etc/firewalld/firewalld.conf
  19. - user: root
  20. - group: root
  21. - mode: 640
  22. - source: salt://firewalld/files/firewalld.conf
  23. - template: jinja
  24. - require:
  25. - pkg: package_firewalld # make sure package is installed
  26. - file: directory_firewalld
  27. - listen_in:
  28. - module: service_firewalld # restart service