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

123456789101112131415161718192021222324252627
  1. # -*- coding: utf-8 -*-
  2. # vim: ft=jinja
  3. {## Start with defaults from defaults.yaml ##}
  4. {% import_yaml "firewalld/defaults.yaml" as default_settings %}
  5. {##
  6. Setup variable using grains['os_family'] based logic, only add key:values here
  7. that differ from whats in defaults.yaml
  8. ##}
  9. {% set os_family_map = salt['grains.filter_by']({
  10. 'Debian': {},
  11. 'RedHat': {},
  12. 'Arch': {},
  13. 'Suse': {},
  14. }, grain='os_family', merge=salt['pillar.get']('firewalld:lookup'))
  15. %}
  16. {## Merge the flavor_map to the default settings ##}
  17. {% do default_settings.firewalld.update(os_family_map) %}
  18. {## Merge in salt:lookup pillar ##}
  19. {% set firewalld = salt['pillar.get'](
  20. 'firewalld',
  21. default=default_settings.firewalld,
  22. merge=True)
  23. %}