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.

34 lines
991B

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=sls
  3. {%- set tplroot = tpldir.split('/')[0] %}
  4. {%- set sls_service_running = tplroot ~ '.service.running' %}
  5. {%- set sls_package_install = tplroot ~ '.package.install' %}
  6. {%- from tplroot ~ "/map.jinja" import apache with context %}
  7. {%- if grains['os_family']=="FreeBSD" %}
  8. include:
  9. - {{ sls_service_running }}
  10. - {{ sls_package_install }}
  11. apache-config-modules-cgi-cmd-run:
  12. file.managed:
  13. - name: {{ apache.modulesdir }}/040_mod_cgi.conf
  14. - source: salt://apache/files/FreeBSD/mod_cgi.conf.jinja
  15. - template: {{ apache.get('template_engine', 'jinja') }}
  16. - makedirs: True
  17. - context:
  18. apache: {{ apache|json }}
  19. - require:
  20. - pkg: apache-package-install-pkg-installed
  21. - watch_in:
  22. - module: apache-service-running-restart
  23. - require_in:
  24. - module: apache-service-running-restart
  25. - module: apache-service-running-reload
  26. - service: apache-service-running
  27. - mode: 644
  28. {%- endif %}