Saltstack Official FirewallD Formula
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

map.jinja 1.0KB

123456789101112131415161718192021222324252627282930
  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. {% import_yaml "firewalld/osarchmap.yaml" as osarchmap %}
  6. {% import_yaml "firewalld/osfamilymap.yaml" as osfamilymap %}
  7. {% import_yaml "firewalld/osmap.yaml" as osmap %}
  8. {% import_yaml "firewalld/osfingermap.yaml" as osfingermap %}
  9. {% set _config = salt['config.get']('firewalld', default={}) %}
  10. {% set defaults = salt['grains.filter_by'](default_settings,
  11. default='firewalld',
  12. merge=salt['grains.filter_by'](osarchmap, grain='osarch',
  13. merge=salt['grains.filter_by'](osfamilymap, grain='os_family',
  14. merge=salt['grains.filter_by'](osmap, grain='os',
  15. merge=salt['grains.filter_by'](osfingermap, grain='osfinger',
  16. merge=salt['grains.filter_by'](_config, default='lookup')
  17. )
  18. )
  19. )
  20. )
  21. ) %}
  22. {% set firewalld = salt['grains.filter_by'](
  23. {'defaults': defaults},
  24. default='defaults',
  25. merge=_config
  26. ) %}