Saltstack Official Apache Formula
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

mod_php5.sls 1.6KB

11 lat temu
11 lat temu
11 lat temu
11 lat temu
11 lat temu
11 lat temu
11 lat temu
11 lat temu
11 lat temu
11 lat temu
11 lat temu
11 lat temu
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. {% from "apache/map.jinja" import apache with context %}
  2. include:
  3. - apache
  4. mod-php5:
  5. pkg.installed:
  6. - name: {{ apache.mod_php5 }}
  7. - order: 180
  8. - require:
  9. - pkg: apache
  10. {% if grains['os_family']=="Debian" %}
  11. a2enmod php5:
  12. cmd.run:
  13. - unless: ls /etc/apache2/mods-enabled/php5.load
  14. - order: 225
  15. - require:
  16. - pkg: mod-php5
  17. - watch_in:
  18. - module: apache-restart
  19. - require_in:
  20. - module: apache-restart
  21. - module: apache-reload
  22. - service: apache
  23. {% if 'apache' in pillar and 'php-ini' in pillar['apache'] %}
  24. /etc/php5/apache2/php.ini:
  25. file.managed:
  26. - source: {{ pillar['apache']['php-ini'] }}
  27. - order: 225
  28. - watch_in:
  29. - module: apache-restart
  30. - require_in:
  31. - module: apache-restart
  32. - module: apache-reload
  33. - service: apache
  34. - require:
  35. - pkg: apache
  36. - pkg: mod-php5
  37. {% endif %}
  38. {% elif grains['os_family']=="FreeBSD" %}
  39. {{ apache.modulesdir }}/050_mod_php5.conf:
  40. file.managed:
  41. - source: salt://apache/files/{{ salt['grains.get']('os_family') }}/mod_php5.conf.jinja
  42. - mode: 644
  43. - template: jinja
  44. - require:
  45. - pkg: apache
  46. - watch_in:
  47. - module: apache-restart
  48. - require_in:
  49. - module: apache-restart
  50. - module: apache-reload
  51. - service: apache
  52. {% endif %}
  53. {% if grains['os_family']=="Suse" or salt['grains.get']('os') == 'SUSE' %}
  54. /etc/sysconfig/apache2:
  55. file.replace:
  56. - unless: grep '^APACHE_MODULES=.*php5' /etc/sysconfig/apache2
  57. - pattern: '^APACHE_MODULES=(.*)"'
  58. - repl: 'APACHE_MODULES=\1 php5"'
  59. {% endif %}