|
|
|
|
|
|
|
|
{% if grains.os_family == 'Debian' %} |
|
|
{% if grains.os_family == 'Debian' %} |
|
|
{% if site.get('enabled', True) %} |
|
|
{% if site.get('enabled', True) %} |
|
|
a2ensite {{ id }}{{ apache.confext }}: |
|
|
a2ensite {{ id }}{{ apache.confext }}: |
|
|
cmd: |
|
|
|
|
|
- run |
|
|
|
|
|
|
|
|
cmd.run: |
|
|
- unless: test -f /etc/apache2/sites-enabled/{{ id }}{{ apache.confext }} |
|
|
- unless: test -f /etc/apache2/sites-enabled/{{ id }}{{ apache.confext }} |
|
|
- require: |
|
|
- require: |
|
|
- file: /etc/apache2/sites-available/{{ id }}{{ apache.confext }} |
|
|
- file: /etc/apache2/sites-available/{{ id }}{{ apache.confext }} |
|
|
|
|
|
|
|
|
- module: apache-reload |
|
|
- module: apache-reload |
|
|
{% else %} |
|
|
{% else %} |
|
|
a2dissite {{ id }}{{ apache.confext }}: |
|
|
a2dissite {{ id }}{{ apache.confext }}: |
|
|
cmd: |
|
|
|
|
|
- run |
|
|
|
|
|
|
|
|
cmd.run: |
|
|
- onlyif: test -f /etc/apache2/sites-enabled/{{ id }}{{ apache.confext }} |
|
|
- onlyif: test -f /etc/apache2/sites-enabled/{{ id }}{{ apache.confext }} |
|
|
- require: |
|
|
- require: |
|
|
- file: /etc/apache2/sites-available/{{ id }}{{ apache.confext }} |
|
|
- file: /etc/apache2/sites-available/{{ id }}{{ apache.confext }} |