Saltstack Official FirewallD Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930
  1. # == State: firewalld.direct
  2. {% from "firewalld/map.jinja" import firewalld with context %}
  3. # == Define: firewalld.direct
  4. #
  5. # This defines a configuration for permanent direct chains,
  6. # rules and passtthroughs, see firewalld.direct (5) man page.
  7. {%- if firewalld.get('direct', False) %}
  8. /etc/firewalld/direct.xml:
  9. file:
  10. - managed
  11. - name: /etc/firewalld/direct.xml
  12. - user: root
  13. - group: root
  14. - mode: "0644"
  15. - source: salt://firewalld/files/direct.xml
  16. - template: jinja
  17. - require:
  18. - pkg: package_firewalld # make sure package is installed
  19. - file: directory_firewalld
  20. - require_in:
  21. - service: service_firewalld
  22. - watch_in:
  23. - cmd: reload_firewalld # reload firewalld config
  24. - context:
  25. direct: {{ firewalld.direct|json }}
  26. {%- endif %}