{% if grains['os_family']=="Debian" %} | |||||
include: | include: | ||||
- apt | - apt | ||||
- apache | - apache | ||||
- apache.register_site | - apache.register_site | ||||
{% if grains['os']=="Ubuntu" %} | |||||
extend: | extend: | ||||
apache: | apache: | ||||
pkg: | pkg: | ||||
- require: | - require: | ||||
- pkg: apache | - pkg: apache | ||||
{% endif %} #END: os = ubuntu | |||||
{% endif %} #END: os = debian |
{% if grains['os_family']=="Debian" %} | |||||
include: | include: | ||||
- apt | - apt | ||||
{% if grains['os']=="Ubuntu" %} | |||||
mod-fcgid: | mod-fcgid: | ||||
pkg.installed: | pkg.installed: | ||||
- name: libapache2-mod-fcgid | - name: libapache2-mod-fcgid |
{% if grains['os_family']=="Debian" %} | |||||
include: | include: | ||||
- apt | - apt | ||||
{% if grains['os']=="Ubuntu" %} | |||||
mod-php5: | mod-php5: | ||||
pkg.installed: | pkg.installed: | ||||
- name: libapache2-mod-php5 | - name: libapache2-mod-php5 |
{% if grains['os_family']=="Debian" %} | |||||
{% if 'apache' in pillar and 'register-site' in pillar['apache'] %} #BEGIN: ['apache']['register-site'] | {% if 'apache' in pillar and 'register-site' in pillar['apache'] %} #BEGIN: ['apache']['register-site'] | ||||
{% for site in pillar['apache']['register-site'] %} | {% for site in pillar['apache']['register-site'] %} | ||||
{% endfor %} | {% endfor %} | ||||
{% endif %} #END: apache-register-site | {% endif %} #END: apache-register-site | ||||
{% endif %} #END: grains['os_family'] == debian |
{% if grains['os_family']=="Debian" %} | |||||
include: | include: | ||||
- apt | - apt | ||||
{% if grains['os']=="Ubuntu" %} | |||||
a2enmod rewrite: | a2enmod rewrite: | ||||
cmd.run: | cmd.run: | ||||
- unless: ls /etc/apache2/mods-enabled/rewrite.load | - unless: ls /etc/apache2/mods-enabled/rewrite.load |