2016-01-19 22:15:08 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: ft=jinja
|
|
|
|
|
2019-11-09 08:05:11 +01:00
|
|
|
{#- Start with defaults from defaults.yaml #}
|
2016-01-19 22:15:08 +01:00
|
|
|
{% import_yaml "firewalld/defaults.yaml" as default_settings %}
|
2020-04-13 18:14:32 +02:00
|
|
|
{% import_yaml "firewalld/osarchmap.yaml" as osarchmap %}
|
2020-04-09 16:52:33 +02:00
|
|
|
{% import_yaml "firewalld/osfamilymap.yaml" as osfamilymap %}
|
2020-04-13 18:14:32 +02:00
|
|
|
{% import_yaml "firewalld/osmap.yaml" as osmap %}
|
|
|
|
{% import_yaml "firewalld/osfingermap.yaml" as osfingermap %}
|
2016-01-19 22:15:08 +01:00
|
|
|
|
2020-04-13 18:14:32 +02:00
|
|
|
{% set _config = salt['config.get']('firewalld', default={}) %}
|
|
|
|
|
|
|
|
{% set defaults = salt['grains.filter_by'](default_settings,
|
|
|
|
default='firewalld',
|
|
|
|
merge=salt['grains.filter_by'](osarchmap, grain='osarch',
|
|
|
|
merge=salt['grains.filter_by'](osfamilymap, grain='os_family',
|
|
|
|
merge=salt['grains.filter_by'](osmap, grain='os',
|
|
|
|
merge=salt['grains.filter_by'](osfingermap, grain='osfinger',
|
|
|
|
merge=salt['grains.filter_by'](_config, default='lookup')
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2020-04-09 16:52:33 +02:00
|
|
|
)
|
|
|
|
) %}
|
2016-01-19 22:15:08 +01:00
|
|
|
|
2020-04-13 18:14:32 +02:00
|
|
|
{% set firewalld = salt['grains.filter_by'](
|
|
|
|
{'defaults': defaults},
|
|
|
|
default='defaults',
|
|
|
|
merge=_config
|
|
|
|
) %}
|