Saltstack Official Apache Formula
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

42 rindas
1.2KB

  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-xsendfile-pkg:
  11. pkg.installed:
  12. - name: {{ apache.mod_xsendfile }}
  13. - order: 180
  14. - require:
  15. - pkg: apache-package-install-pkg-installed
  16. - watch_in:
  17. - module: apache-service-running-restart
  18. - require_in:
  19. - module: apache-service-running-restart
  20. - module: apache-service-running-reload
  21. - service: apache-service-running
  22. {%- if grains['os_family'] in ('Suse', 'Debian',) %}
  23. cmd.run:
  24. - name: a2enmod xsendfile
  25. - order: 225
  26. - unless: ls {{ apache.moddir }}/xsendfile.load || egrep "^APACHE_MODULES=" /etc/sysconfig/apache2 | grep xsendfile
  27. - require:
  28. - pkg: apache-config-xsendfile-pkg
  29. - watch_in:
  30. - module: apache-service-running-restart
  31. - require_in:
  32. - module: apache-service-running-restart
  33. - module: apache-service-running-reload
  34. - service: apache-service-running
  35. {%- endif %}