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.

pirms 10 gadiem
pirms 10 gadiem
pirms 10 gadiem
pirms 10 gadiem
pirms 10 gadiem
pirms 10 gadiem
pirms 10 gadiem
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # == State: firewalld
  2. #
  3. # This state installs/runs firewalld.
  4. #
  5. {% from "firewalld/map.jinja" import firewalld with context %}
  6. {% if salt['pillar.get']('firewalld:enabled') %}
  7. include:
  8. - firewalld.config
  9. - firewalld.ipsets
  10. - firewalld.services
  11. - firewalld.zones
  12. - firewalld.direct
  13. # iptables service that comes with rhel/centos
  14. iptables:
  15. service.disabled:
  16. - enable: False
  17. ip6tables:
  18. service.disabled:
  19. - enable: False
  20. package_firewalld:
  21. pkg.installed:
  22. - name: {{ firewalld.package }}
  23. service_firewalld:
  24. service.running:
  25. - name: {{ firewalld.service }}
  26. - enable: True # start on boot
  27. - require:
  28. - pkg: package_firewalld
  29. - file: config_firewalld
  30. - service: iptables # ensure it's stopped
  31. - service: ip6tables # ensure it's stopped
  32. reload_firewalld:
  33. cmd.wait:
  34. - name: 'firewall-cmd --reload'
  35. - require:
  36. - service: service_firewalld
  37. {% else %}
  38. service_firewalld:
  39. service.dead:
  40. - name: {{ firewalld.service }}
  41. - enable: False # don't start on boot
  42. {% endif %}