firewalld-formula/firewalld/map.jinja
Robin Schneider 7281fba7ab
refactor: [DATALAD RUNCMD] Use relative state include
Ref: https://github.com/saltstack-formulas/packages-formula/pull/74

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "git ls-files -z firewalld | xargs --null -I '()' find '()' -type f -print0 | xargs --null sed --in-place --regexp-extended 's#\"firewalld/#\"./#g;s#- firewalld\\.#- .#;'",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
2021-10-05 14:44:41 +02:00

31 lines
989 B
Django/Jinja

# -*- coding: utf-8 -*-
# vim: ft=jinja
{#- Start with defaults from defaults.yaml #}
{% import_yaml "./defaults.yaml" as default_settings %}
{% import_yaml "./osarchmap.yaml" as osarchmap %}
{% import_yaml "./osfamilymap.yaml" as osfamilymap %}
{% import_yaml "./osmap.yaml" as osmap %}
{% import_yaml "./osfingermap.yaml" as osfingermap %}
{% 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')
)
)
)
)
) %}
{% set firewalld = salt['grains.filter_by'](
{'defaults': defaults},
default='defaults',
merge=_config
) %}