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.

27 lines
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. %}