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.

41 lines
1.1KB

  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. include:
  8. - {{ sls_service_running }}
  9. - {{ sls_package_install }}
  10. apache-config-modules-wsgi-pkg:
  11. pkg.installed:
  12. - name: {{ apache.mod_wsgi }}
  13. - require:
  14. - pkg: apache-package-install-pkg-installed
  15. - watch_in:
  16. - module: apache-service-running-restart
  17. - require_in:
  18. - module: apache-service-running-restart
  19. - module: apache-service-running-reload
  20. - service: apache-service-running
  21. {%- if 'conf_mod_wsgi' in apache %}
  22. file.uncomment:
  23. - name: {{ apache.conf_mod_wsgi }}
  24. - regex: LoadModule
  25. - onlyif: test -f {{ apache.conf_mod_wsgi }}
  26. - require:
  27. - pkg: apache-config-modules-wsgi-pkg
  28. - watch_in:
  29. - module: apache-service-running-restart
  30. - require_in:
  31. - module: apache-service-running-restart
  32. - module: apache-service-running-reload
  33. - service: apache-service-running
  34. {%- endif %}