Saltstack Official FirewallD Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 7 години
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. %}