Sfoglia il codice sorgente

Merge pull request #249 from aboe76/master

use watch module: apache-[restart|reload] consequently
tags/v0.37.4
Javier Bértoli 6 anni fa
parent
commit
a881f63780
Nessun account collegato all'indirizzo email del committer
36 ha cambiato i file con 340 aggiunte e 7 eliminazioni
  1. +12
    -0
      apache/certificates.sls
  2. +36
    -0
      apache/config.sls
  3. +4
    -0
      apache/debian_full.sls
  4. +2
    -0
      apache/defaults.yaml
  5. +8
    -0
      apache/flags.sls
  6. +15
    -6
      apache/init.sls
  7. +4
    -0
      apache/manage_security.sls
  8. +4
    -0
      apache/mod_actions.sls
  9. +4
    -0
      apache/mod_cgi.sls
  10. +8
    -0
      apache/mod_dav_svn.sls
  11. +10
    -0
      apache/mod_fastcgi.sls
  12. +4
    -0
      apache/mod_fcgid.sls
  13. +5
    -1
      apache/mod_geoip.sls
  14. +4
    -0
      apache/mod_headers.sls
  15. +16
    -0
      apache/mod_mpm.sls
  16. +4
    -0
      apache/mod_pagespeed.sls
  17. +14
    -0
      apache/mod_perl2.sls
  18. +12
    -0
      apache/mod_php5.sls
  19. +8
    -0
      apache/mod_proxy.sls
  20. +4
    -0
      apache/mod_proxy_fcgi.sls
  21. +8
    -0
      apache/mod_proxy_http.sls
  22. +16
    -0
      apache/mod_remoteip.sls
  23. +8
    -0
      apache/mod_rewrite.sls
  24. +20
    -0
      apache/mod_security/init.sls
  25. +4
    -0
      apache/mod_socache_shmcb.sls
  26. +24
    -0
      apache/mod_ssl.sls
  27. +4
    -0
      apache/mod_suexec.sls
  28. +4
    -0
      apache/mod_vhost_alias.sls
  29. +12
    -0
      apache/mod_wsgi.sls
  30. +10
    -0
      apache/mod_xsendfile.sls
  31. +24
    -0
      apache/modules.sls
  32. +4
    -0
      apache/no_default_vhost.sls
  33. +4
    -0
      apache/own_default_vhost.sls
  34. +4
    -0
      apache/register_site.sls
  35. +4
    -0
      apache/vhosts/cleanup.sls
  36. +12
    -0
      apache/vhosts/standard.sls

+ 12
- 0
apache/certificates.sls Vedi File

@@ -17,6 +17,10 @@ apache_cert_config_{{ site }}_key_file:
- group: root
- watch_in:
- module: apache-reload
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endif %}

{% if confcert.SSLCertificateFile is defined and confcert.SSLCertificateFile_content is defined %}
@@ -31,6 +35,10 @@ apache_cert_config_{{ site }}_cert_file:
- group: root
- watch_in:
- module: apache-reload
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endif %}

{% if confcert.SSLCertificateChainFile is defined and confcert.SSLCertificateChainFile_content is defined %}
@@ -45,6 +53,10 @@ apache_cert_config_{{ site }}_bundle_file:
- group: root
- watch_in:
- module: apache-reload
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endif %}

{%- endfor %}

+ 36
- 0
apache/config.sls Vedi File

@@ -9,6 +9,10 @@ include:
- require:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{{ apache.configfile }}:
@@ -19,6 +23,10 @@ include:
- require:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
- context:
apache: {{ apache }}
@@ -29,6 +37,10 @@ include:
- require:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% if grains['os_family']=="Debian" %}
@@ -40,6 +52,10 @@ include:
- require:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{{ apache.portsfile }}:
@@ -50,6 +66,10 @@ include:
- require:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
- context:
apache: {{ apache }}
@@ -62,6 +82,10 @@ include:
- require:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endif %}

@@ -74,6 +98,10 @@ include:
- require:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
- context:
apache: {{ apache }}
@@ -88,6 +116,10 @@ include:
- require:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{{ apache.portsfile }}:
@@ -98,6 +130,10 @@ include:
- require:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
- context:
apache: {{ apache }}

+ 4
- 0
apache/debian_full.sls Vedi File

@@ -24,6 +24,10 @@ a2dissite 000-default{{ apache.confext }}:
- onlyif: test -f /etc/apache2/sites-enabled/000-default{{ apache.confext }}
- watch_in:
- module: apache-reload
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
- require:
- pkg: apache


+ 2
- 0
apache/defaults.yaml Vedi File

@@ -3,6 +3,8 @@

apache:
manage_service_states: True
service_state: running
service_enable: True

mod_security:
crs_install: False

+ 8
- 0
apache/flags.sls Vedi File

@@ -13,6 +13,10 @@ a2enflag {{ flag }}:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endfor %}

{% for module in salt['pillar.get']('apache:flags:disabled', []) %}
@@ -23,6 +27,10 @@ a2disflag -f {{ flag }}:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endfor %}

{% endif %}

+ 15
- 6
apache/init.sls Vedi File

@@ -12,26 +12,35 @@ apache:
- system: True
{# By default run apache service states (unless pillar is false) #}
{% if salt['pillar.get']('apache:manage_service_states', True) %}
service.running:
service.{{apache.service_state}}:
- name: {{ apache.service }}
{% if apache.service_state in [ 'running', 'dead' ] %}
- enable: True
- require:
- module: apache-restart
- module: apache-reload
{% endif %}

# The following states are inert by default and can be used by other states to
# trigger a restart or reload as needed.
apache-reload:
module.wait:
{% if apache.service_state in ['running'] %}
- name: service.reload
- m_name: {{ apache.service }}
- require:
- module: apache-restart
{% else %}
- name: cmd.run
- cmd: {{apache.custom_reload_command|default('apachectl graceful')}}
- python_shell: True
{% endif %}

apache-restart:
module.wait:
{% if apache.service_state in ['running'] %}
- name: service.restart
- m_name: {{ apache.service }}
{% else %}
- name: cmd.run
- cmd: {{apache.custom_reload_command|default('apachectl graceful')}}
- python_shell: True
{% endif %}

{% else %}


+ 4
- 0
apache/manage_security.sls Vedi File

@@ -12,6 +12,10 @@
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{%- endmacro %}

include:

+ 4
- 0
apache/mod_actions.sls Vedi File

@@ -11,5 +11,9 @@ a2enmod actions:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}

+ 4
- 0
apache/mod_cgi.sls Vedi File

@@ -14,5 +14,9 @@ include:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}

+ 8
- 0
apache/mod_dav_svn.sls Vedi File

@@ -16,6 +16,10 @@ a2enmod dav_svn:
- pkg: libapache2-mod-svn
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

a2enmod authz_svn:
cmd.run:
@@ -26,5 +30,9 @@ a2enmod authz_svn:
- pkg: libapache2-mod-svn
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}

+ 10
- 0
apache/mod_fastcgi.sls Vedi File

@@ -12,6 +12,12 @@ mod-fastcgi:
- require:
- pkgrepo: repo-fastcgi
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

repo-fastcgi:
pkgrepo.managed:
@@ -28,6 +34,10 @@ a2enmod fastcgi:
- pkg: mod-fastcgi
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}


+ 4
- 0
apache/mod_fcgid.sls Vedi File

@@ -20,5 +20,9 @@ a2enmod fcgid for apache.mod_fcgid:
- pkg: mod-fcgid
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}

+ 5
- 1
apache/mod_geoip.sls Vedi File

@@ -12,9 +12,13 @@ mod-geoip:
- {{ apache.mod_geoip_database }}
- require:
- pkg: apache

- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache


{% if grains['os_family']=="RedHat" %}
geoip conf:

+ 4
- 0
apache/mod_headers.sls Vedi File

@@ -11,5 +11,9 @@ a2enmod headers:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}

+ 16
- 0
apache/mod_mpm.sls Vedi File

@@ -13,6 +13,10 @@ a2enmod {{ mpm_module }}:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
file.managed:
- name: /etc/apache2/mods-available/{{ mpm_module }}.conf
- template: jinja
@@ -22,6 +26,10 @@ a2enmod {{ mpm_module }}:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

# Deactivate the other mpm modules as a previous step
{% for mod in ['mpm_prefork', 'mpm_worker', 'mpm_event'] if not mod == mpm_module %}
@@ -34,6 +42,10 @@ a2dismod {{ mod }}:
- cmd: a2enmod {{ mpm_module }}
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endfor %}

{% endif %}
@@ -53,5 +65,9 @@ include:
- pkg: httpd
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}

+ 4
- 0
apache/mod_pagespeed.sls Vedi File

@@ -17,6 +17,10 @@ a2enmod pagespeed:
- require:
- pkg: libapache2-mod-pagespeed
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% for dir in ['/var/cache/mod_pagespeed', '/var/log/pagespeed'] %}

+ 14
- 0
apache/mod_perl2.sls Vedi File

@@ -9,6 +9,12 @@ mod-perl2:
- order: 180
- require:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% if grains['os_family']=="Debian" %}
a2enmod perl2:
@@ -19,6 +25,10 @@ a2enmod perl2:
- pkg: mod-perl2
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% elif grains['os_family']=="FreeBSD" %}

@@ -31,5 +41,9 @@ a2enmod perl2:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}

+ 12
- 0
apache/mod_php5.sls Vedi File

@@ -19,6 +19,10 @@ a2enmod php5:
- pkg: mod-php5
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% if 'apache' in pillar and 'php-ini' in pillar['apache'] %}
/etc/php5/apache2/php.ini:
@@ -27,6 +31,10 @@ a2enmod php5:
- order: 225
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
- require:
- pkg: apache
- pkg: mod-php5
@@ -43,6 +51,10 @@ a2enmod php5:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}


+ 8
- 0
apache/mod_proxy.sls Vedi File

@@ -13,6 +13,10 @@ a2enmod mod_proxy:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% elif grains['os_family']=="FreeBSD" %}
{{ apache.modulesdir }}/040_mod_proxy.conf:
@@ -24,5 +28,9 @@ a2enmod mod_proxy:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}

+ 4
- 0
apache/mod_proxy_fcgi.sls Vedi File

@@ -13,5 +13,9 @@ a2enmod proxy_fcgi:
- cmd: a2enmod proxy
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}

+ 8
- 0
apache/mod_proxy_http.sls Vedi File

@@ -15,6 +15,10 @@ a2enmod proxy_http:
- cmd: a2enmod proxy
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% elif grains['os_family']=="FreeBSD" %}
{{ apache.modulesdir }}/040_mod_proxy_http.conf:
@@ -26,5 +30,9 @@ a2enmod proxy_http:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}

+ 16
- 0
apache/mod_remoteip.sls Vedi File

@@ -11,6 +11,10 @@ a2enmod remoteip:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

a2enconf remoteip:
cmd.run:
@@ -20,6 +24,10 @@ a2enconf remoteip:
- pkg: apache
- watch_in:
- module: apache-reload
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

/etc/apache2/conf-available/remoteip.conf:
file.managed:
@@ -29,6 +37,10 @@ a2enconf remoteip:
- require:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endif %}

@@ -46,6 +58,10 @@ include:
- require:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}

+ 8
- 0
apache/mod_rewrite.sls Vedi File

@@ -12,6 +12,10 @@ a2enmod rewrite:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% elif grains['os_family']=="FreeBSD" %}

@@ -24,5 +28,9 @@ a2enmod rewrite:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}

+ 20
- 0
apache/mod_security/init.sls Vedi File

@@ -9,6 +9,12 @@ mod-security:
- order: 180
- require:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% if apache.mod_security.crs_install %}
mod-security-crs:
@@ -17,6 +23,12 @@ mod-security-crs:
- order: 180
- require:
- pkg: mod-security
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endif %}

{% if apache.mod_security.manage_config %}
@@ -32,6 +44,10 @@ mod-security-main-config:
- pkg: mod-security
- watch_in:
- module: apache-reload
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endif %}

{% if grains['os_family']=="Debian" %}
@@ -43,4 +59,8 @@ a2enmod security2:
- pkg: mod-security
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endif %}

+ 4
- 0
apache/mod_socache_shmcb.sls Vedi File

@@ -14,6 +14,10 @@ include:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
- context:
module_name: socache_shmcb


+ 24
- 0
apache/mod_ssl.sls Vedi File

@@ -14,6 +14,10 @@ a2enmod mod_ssl:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

/etc/apache2/mods-available/ssl.conf:
file.managed:
@@ -32,12 +36,20 @@ mod_ssl:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{{ apache.confdir }}/ssl.conf:
file.absent:
- require:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% elif grains['os_family']=="FreeBSD" %}
@@ -55,6 +67,10 @@ include:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}

@@ -71,6 +87,10 @@ include:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% if grains['os_family']=="Debian" %}
a2endisconf tls-defaults:
@@ -88,4 +108,8 @@ a2endisconf tls-defaults:
- file: {{ apache.confdir }}/tls-defaults.conf
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endif %}

+ 4
- 0
apache/mod_suexec.sls Vedi File

@@ -14,5 +14,9 @@ include:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}

+ 4
- 0
apache/mod_vhost_alias.sls Vedi File

@@ -11,5 +11,9 @@ a2enmod vhost_alias:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}

+ 12
- 0
apache/mod_wsgi.sls Vedi File

@@ -8,6 +8,12 @@ mod_wsgi:
- name: {{ apache.mod_wsgi }}
- require:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% if 'conf_mod_wsgi' in apache %}
{{ apache.conf_mod_wsgi }}:
@@ -16,4 +22,10 @@ mod_wsgi:
- onlyif: test -f {{ apache.conf_mod_wsgi }}
- require:
- pkg: mod_wsgi
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endif %}

+ 10
- 0
apache/mod_xsendfile.sls Vedi File

@@ -9,6 +9,12 @@ mod-xsendfile:
- order: 180
- require:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% if grains['os_family']=="Debian" %}
a2enmod xsendfile:
@@ -19,6 +25,10 @@ a2enmod xsendfile:
- pkg: mod-xsendfile
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}


+ 24
- 0
apache/modules.sls Vedi File

@@ -12,6 +12,10 @@ a2enmod {{ module }}:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endfor %}

{% for module in salt['pillar.get']('apache:modules:disabled', []) %}
@@ -23,6 +27,10 @@ a2dismod -f {{ module }}:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endfor %}

{% elif grains['os_family']=="RedHat" %}
@@ -39,6 +47,10 @@ find /etc/httpd/ -name '*.conf' -type f -exec sed -i -e 's/\(^#\)\(\s*LoadModule
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endfor %}

{% for module in salt['pillar.get']('apache:modules:disabled', []) %}
@@ -50,6 +62,10 @@ find /etc/httpd/ -name '*.conf' -type f -exec sed -i -e 's/\(^\s*LoadModule.{{ m
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endfor %}

{% elif salt['grains.get']('os_family') == 'Suse' or salt['grains.get']('os') == 'SUSE' %}
@@ -66,6 +82,10 @@ a2enmod {{ module }}:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endfor %}

{% for module in salt['pillar.get']('apache:modules:disabled', []) %}
@@ -77,6 +97,10 @@ a2dismod -f {{ module }}:
- pkg: apache
- watch_in:
- module: apache-restart
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endfor %}

{% endif %}

+ 4
- 0
apache/no_default_vhost.sls Vedi File

@@ -12,5 +12,9 @@ a2dissite 000-default.conf:
- pkg: apache
- watch_in:
- module: apache-reload
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}

+ 4
- 0
apache/own_default_vhost.sls Vedi File

@@ -13,5 +13,9 @@ apache_own-default-vhost:
- pkg: apache
- watch_in:
- module: apache-reload
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}

+ 4
- 0
apache/register_site.sls Vedi File

@@ -49,6 +49,10 @@
- watch_in:
- cmd: {{ a2modid }}
- module: apache-reload
- require_in:
- module: apache-restart
- module; apache-reload
- service: apache

{% endif %}
##########################################

+ 4
- 0
apache/vhosts/cleanup.sls Vedi File

@@ -29,6 +29,10 @@ a2dissite {{ filename }}:
- onlyif: "test -L {{ dirpath}}/{{ filename }} || test -f {{ dirpath}}/{{ filename }}"
- watch_in:
- module: apache-reload
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% endif %}
{% endfor %}

+ 12
- 0
apache/vhosts/standard.sls Vedi File

@@ -19,6 +19,10 @@ apache_vhosts_{{ id }}:
- pkg: apache
- watch_in:
- module: apache-reload
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache

{% if site.get('DocumentRoot') != False %}
{{ id }}-documentroot:
@@ -39,6 +43,10 @@ a2ensite {{ id }}{{ apache.confext }}:
- file: /etc/apache2/sites-available/{{ id }}{{ apache.confext }}
- watch_in:
- module: apache-reload
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% else %}
a2dissite {{ id }}{{ apache.confext }}:
cmd.run:
@@ -47,6 +55,10 @@ a2dissite {{ id }}{{ apache.confext }}:
- file: /etc/apache2/sites-available/{{ id }}{{ apache.confext }}
- watch_in:
- module: apache-reload
- require_in:
- module: apache-restart
- module: apache-reload
- service: apache
{% endif %}
{% endif %}


Loading…
Annulla
Salva