Saltstack Official FirewallD Formula
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

123456789101112131415161718192021222324252627282930
  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. config_firewalld:
  15. file.managed:
  16. - name: /etc/firewalld/firewalld.conf
  17. - user: root
  18. - group: root
  19. - mode: 640
  20. - source: salt://firewalld/files/firewalld.conf
  21. - template: jinja
  22. - require:
  23. - pkg: package_firewalld # make sure package is installed
  24. - file: directory_firewalld
  25. - require_in:
  26. - service: service_firewalld
  27. - watch_in:
  28. - cmd: reload_firewalld # reload firewalld config