{# 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 %} {% set lookup = salt['pillar.get']('apache:lookup', default={}, merge=True) %} {% do defaults.apache.update(lookup) %} {# merge the modsecurity #} {% set modsecurity = salt['grains.filter_by'](modsec, grain='os_family') or{} %} {% do defaults.apache.update(modsecurity) %} {# merge the osfamilymap #} {% set osfamily = salt['grains.filter_by'](osfamilymap, grain='os_family') or{} %} {% do defaults.apache.update(osfamily) %} {# merge the oscodenamemap #} {% set oscode = salt['grains.filter_by'](oscodenamemap, grain='oscodename') or {} %} {% do defaults.apache.update(oscode) %} {# merge the osfingermap #} {% set osfinger = salt['grains.filter_by'](osfingermap, grain='osfinger') or {} %} {% do defaults.apache.update(osfinger) %} {# merge all #} {% set apache = salt['pillar.get']('apache', default=defaults['apache'], merge=true) %}