apache-formula/apache/map.jinja

31 lines
1.3 KiB
Plaintext
Raw Normal View History

{# vi: set ft=jinja: #}
{% import_yaml "apache/defaults.yaml" as defaults %}
{% import_yaml "apache/osfamilymap.yaml" as osfamilymap %}
{% import_yaml "apache/oscodenamemap.yaml" as oscodenamemap %}
{% import_yaml "apache/osfingermap.yaml" as osfingermap %}
{% import_yaml "apache/modsecurity.yaml" as modsec %}
{# merge the modsecurity #}
{% set modsecurity = salt['grains.filter_by'](modsec, grain='os_family') or{} %}
2019-01-29 20:28:46 +01:00
{% do salt['defaults.merge'](defaults['apache'], modsecurity) %}
2017-11-03 17:47:20 +01:00
{# merge the osfamilymap #}
{% set osfamily = salt['grains.filter_by'](osfamilymap, grain='os_family') or{} %}
2019-01-29 20:28:46 +01:00
{% do salt['defaults.merge'](defaults['apache'], osfamily) %}
2017-11-03 17:47:20 +01:00
{# merge the oscodenamemap #}
{% set oscode = salt['grains.filter_by'](oscodenamemap, grain='oscodename') or {} %}
2019-01-29 20:28:46 +01:00
{% do salt['defaults.merge'](defaults['apache'], oscode) %}
{# merge the osfingermap #}
{% set osfinger = salt['grains.filter_by'](osfingermap, grain='osfinger') or {} %}
2019-01-29 20:28:46 +01:00
{% do salt['defaults.merge'](defaults['apache'], osfinger) %}
2019-01-29 20:28:46 +01:00
{# merge the lookup #}
{% set lookup = salt['pillar.get']('apache:lookup', default={}, merge=True) %}
{% do salt['defaults.merge'](defaults['apache'], lookup) %}
2019-01-29 20:28:46 +01:00
{# merge all #}
{% set apache = salt['pillar.get']('apache', default=defaults['apache'], merge=True) %}