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

27 行
721B

  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. }, grain='os_family', merge=salt['pillar.get']('firewalld:lookup'))
  14. %}
  15. {## Merge the flavor_map to the default settings ##}
  16. {% do default_settings.firewalld.update(os_family_map) %}
  17. {## Merge in salt:lookup pillar ##}
  18. {% set firewalld = salt['pillar.get'](
  19. 'firewalld',
  20. default=default_settings.firewalld,
  21. merge=True)
  22. %}