Moved apache-reload and apache-restart commands to init.sls and invoke apache-reload from standard.sls

This commit is contained in:
Alan McNea 2013-11-05 19:34:06 +00:00
parent e34c476ea1
commit c863598ec7
3 changed files with 16 additions and 7 deletions

View File

@ -21,14 +21,12 @@ a2dissite 000-default:
- require:
- pkg: apache
extend:
apache-reload:
cmd.wait:
- name: service apache2 reload
- order: 420
extend:
apache-restart:
cmd.wait:
- name: service apache2 restart
- order: 425
/etc/apache2/sites-available/default:

View File

@ -8,3 +8,12 @@ apache:
- running
- name: {{ apache.service }}
- enable: True
apache-reload:
cmd.wait:
- name: service apache2 reload
apache-restart:
cmd.wait:
- name: service apache2 restart

View File

@ -18,7 +18,7 @@ include:
- require:
- pkg: apache
- watch_in:
- service: apache
- cmd: apache-reload
{% if grains.os_family == 'Debian' %}
a2ensite {{ id }}:
@ -26,6 +26,8 @@ a2ensite {{ id }}:
- run
- require:
- file: {{ id }}
- watch_in:
- cmd: apache-reload
{% endif %}
{% endfor %}