Saltstack Official FirewallD Formula
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

31 lines
812B

  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: 644
  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