Browse Source

Fix `apache:lookup` regression (#252)

tags/v0.37.4
Imran Iqbal 6 years ago
parent
commit
6852f87b7f
1 changed files with 9 additions and 9 deletions
  1. +9
    -9
      apache/map.jinja

+ 9
- 9
apache/map.jinja View File

@@ -6,25 +6,25 @@
{% 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) %}
{% do salt['defaults.merge'](defaults['apache'], modsecurity) %}

{# merge the osfamilymap #}
{% set osfamily = salt['grains.filter_by'](osfamilymap, grain='os_family') or{} %}
{% do defaults.apache.update(osfamily) %}
{% do salt['defaults.merge'](defaults['apache'], osfamily) %}

{# merge the oscodenamemap #}
{% set oscode = salt['grains.filter_by'](oscodenamemap, grain='oscodename') or {} %}
{% do defaults.apache.update(oscode) %}
{% do salt['defaults.merge'](defaults['apache'], oscode) %}

{# merge the osfingermap #}
{% set osfinger = salt['grains.filter_by'](osfingermap, grain='osfinger') or {} %}
{% do defaults.apache.update(osfinger) %}
{% do salt['defaults.merge'](defaults['apache'], osfinger) %}

{# merge all #}
{% set apache = salt['pillar.get']('apache', default=defaults['apache'], merge=true) %}
{# merge the lookup #}
{% set lookup = salt['pillar.get']('apache:lookup', default={}, merge=True) %}
{% do salt['defaults.merge'](defaults['apache'], lookup) %}

{# merge all #}
{% set apache = salt['pillar.get']('apache', default=defaults['apache'], merge=True) %}

Loading…
Cancel
Save