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.

35 lines
632B

  1. include:
  2. - apt
  3. {% if grains['os']=="Ubuntu" %}
  4. mod-php5:
  5. pkg.installed:
  6. - name: libapache2-mod-php5
  7. - order: 180
  8. - require:
  9. - pkg: apache
  10. a2enmod php5:
  11. cmd.run:
  12. - unless: ls /etc/apache2/mods-enabled/php5.load
  13. - order: 225
  14. - require:
  15. - pkg: mod-php5
  16. - watch_in:
  17. - cmd: apache-restart
  18. {% if 'apache' in pillar and 'php-ini' in pillar['apache'] %}
  19. /etc/php5/apache2/php.ini:
  20. file.managed:
  21. - source: {{ pillar['apache']['php-ini'] }}
  22. - order: 225
  23. - watch_in:
  24. - cmd: apache-restart
  25. - require:
  26. - pkg: apache
  27. - pkg: php5
  28. {% endif %}
  29. {% endif %}