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.

34 lines
615B

  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. - require:
  14. - pkg: mod-php5
  15. - watch_in:
  16. - cmd: apache-restart
  17. {% if 'apache' in pillar and 'php-ini' in pillar['apache'] %}
  18. /etc/php5/apache2/php.ini:
  19. file.managed:
  20. - source: {{ pillar['apache']['php-ini'] }}
  21. - order: 225
  22. - watch_in:
  23. - cmd: apache-restart
  24. - require:
  25. - pkg: apache
  26. - pkg: php5
  27. {% endif %}
  28. {% endif %}