|
|
|
|
|
|
|
|
|
|
|
{% from "apache/map.jinja" import apache with context %} |
|
|
{% if grains['os_family']=="Debian" %} |
|
|
{% 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'] |
|
|
|
|
|
|
|
|
{{ a2modid }}: |
|
|
{{ a2modid }}: |
|
|
cmd.run: |
|
|
cmd.run: |
|
|
{% if pillar['apache']['register-site'][site]['state'] == 'enabled' %} |
|
|
{% if pillar['apache']['register-site'][site]['state'] == 'enabled' %} |
|
|
- unless: test -f /etc/apache2/sites-enabled/{{ pillar['apache']['register-site'][site]['name'] }}.conf |
|
|
|
|
|
|
|
|
- unless: test -f /etc/apache2/sites-enabled/{{ pillar['apache']['register-site'][site]['name'] }}{{ apache.confext }} |
|
|
{% else %} |
|
|
{% else %} |
|
|
- onlyif: test -f /etc/apache2/sites-enabled/{{ pillar['apache']['register-site'][site]['name'] }}.conf |
|
|
|
|
|
|
|
|
- onlyif: test -f /etc/apache2/sites-enabled/{{ pillar['apache']['register-site'][site]['name'] }}{{ apache.confext }} |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
- order: 230 |
|
|
- order: 230 |
|
|
- require: |
|
|
- require: |
|
|
- pkg: apache |
|
|
- pkg: apache |
|
|
- file: /etc/apache2/sites-available/{{ pillar['apache']['register-site'][site]['name'] }}.conf |
|
|
|
|
|
|
|
|
- file: /etc/apache2/sites-available/{{ pillar['apache']['register-site'][site]['name'] }}{{ apache.confext }} |
|
|
|
|
|
|
|
|
{% endif %} |
|
|
{% endif %} |
|
|
########################################## |
|
|
########################################## |