Saltstack Official Apache Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.1KB

  1. {# vi: set ft=jinja: #}
  2. {% import_yaml "apache/defaults.yaml" as defaults %}
  3. {% import_yaml "apache/osfamilymap.yaml" as osfamilymap %}
  4. {% import_yaml "apache/oscodenamemap.yaml" as oscodenamemap %}
  5. {% import_yaml "apache/osfingermap.yaml" as osfingermap %}
  6. {% import_yaml "apache/modsecurity.yaml" as modsec %}
  7. {% set lookup = salt['pillar.get']('apache:lookup', default={}, merge=True) %}
  8. {% do defaults.apache.update(lookup) %}
  9. {# merge the modsecurity #}
  10. {% set modsecurity = salt['grains.filter_by'](modsec, grain='os_family') or{} %}
  11. {% do defaults.apache.update(modsecurity) %}
  12. {# merge the osfamilymap #}
  13. {% set osfamily = salt['grains.filter_by'](osfamilymap, grain='os_family') or{} %}
  14. {% do defaults.apache.update(osfamily) %}
  15. {# merge the oscodenamemap #}
  16. {% set oscode = salt['grains.filter_by'](oscodenamemap, grain='oscodename') or {} %}
  17. {% do defaults.apache.update(oscode) %}
  18. {# merge the osfingermap #}
  19. {% set osfinger = salt['grains.filter_by'](osfingermap, grain='osfinger') or {} %}
  20. {% do defaults.apache.update(osfinger) %}
  21. {# merge all #}
  22. {% set apache = salt['pillar.get']('apache', default=defaults['apache'], merge=true) %}