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.

50 lines
1.5KB

  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'] == "Debian" %}
  8. include:
  9. - {{ sls_service_running }}
  10. - {{ sls_package_install }}
  11. - .mod_actions
  12. apache-config-modules-fastcgi-pkg:
  13. pkgrepo.managed:
  14. - name: "deb http://ftp.us.debian.org/debian {{ grains['oscodename'] }}"
  15. - file: /etc/apt/sources.list.d/non-free.list
  16. - onlyif: grep Debian /proc/version >/dev/null 2>&1
  17. - comps: non-free
  18. pkg.installed:
  19. - name: {{ apache.mod_fastcgi }}
  20. - order: 180
  21. - require:
  22. - pkgrepo: apache-config-modules-fastcgi-pkg
  23. - pkg: apache-package-install-pkg-installed
  24. - watch_in:
  25. - module: apache-service-running-restart
  26. - require_in:
  27. - module: apache-service-running-restart
  28. - module: apache-service-running-reload
  29. - service: apache-service-running
  30. apache-config-modules-fastcgi_cmd-run:
  31. cmd.run:
  32. - name: a2enmod fastcgi
  33. - unless: ls {{ apache.moddir }}/fastcgi.load
  34. - order: 225
  35. - require:
  36. - pkg: apache-config-modules-fastcgi-pkg
  37. - watch_in:
  38. - module: apache-service-running-restart
  39. - require_in:
  40. - module: apache-service-running-restart
  41. - module: apache-service-running-reload
  42. - service: apache-service-running
  43. {%- endif %}