apache-formula/apache/php5.sls

35 lines
639 B
Plaintext
Raw Normal View History

{% if grains['os_family']=="Debian" %}
2013-07-29 23:29:41 +02:00
include:
2013-07-29 23:30:14 +02:00
- apt
2013-07-29 23:29:41 +02:00
mod-php5:
pkg.installed:
- name: libapache2-mod-php5
- order: 180
- require:
2013-07-29 23:30:29 +02:00
- pkg: apache
2013-07-29 23:29:41 +02:00
a2enmod php5:
cmd.run:
- unless: ls /etc/apache2/mods-enabled/php5.load
2013-07-29 23:32:16 +02:00
- order: 225
2013-07-29 23:29:41 +02:00
- require:
- pkg: mod-php5
- watch_in:
2013-07-29 23:30:29 +02:00
- cmd: apache-restart
2013-07-29 23:29:41 +02:00
2013-07-29 23:31:15 +02:00
{% if 'apache' in pillar and 'php-ini' in pillar['apache'] %}
2013-07-29 23:29:41 +02:00
/etc/php5/apache2/php.ini:
file.managed:
2013-07-29 23:31:15 +02:00
- source: {{ pillar['apache']['php-ini'] }}
2013-07-29 23:29:41 +02:00
- order: 225
- watch_in:
2013-07-29 23:30:29 +02:00
- cmd: apache-restart
2013-07-29 23:29:41 +02:00
- require:
2013-07-29 23:30:29 +02:00
- pkg: apache
2013-07-29 23:29:41 +02:00
- pkg: php5
{% endif %}
{% endif %}