Browse Source

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

master
Alan McNea 11 years ago
parent
commit
c863598ec7
3 changed files with 16 additions and 7 deletions
  1. +4
    -6
      apache/debian_full.sls
  2. +9
    -0
      apache/init.sls
  3. +3
    -1
      apache/vhosts/standard.sls

+ 4
- 6
apache/debian_full.sls View File

- require: - require:
- pkg: apache - pkg: apache


apache-reload:
cmd.wait:
- name: service apache2 reload
extend:
apache-reload:
- order: 420 - order: 420


apache-restart:
cmd.wait:
- name: service apache2 restart
extend:
apache-restart:
- order: 425 - order: 425


/etc/apache2/sites-available/default: /etc/apache2/sites-available/default:

+ 9
- 0
apache/init.sls View File

- running - running
- name: {{ apache.service }} - name: {{ apache.service }}
- enable: True - enable: True

apache-reload:
cmd.wait:
- name: service apache2 reload

apache-restart:
cmd.wait:
- name: service apache2 restart


+ 3
- 1
apache/vhosts/standard.sls View File

- require: - require:
- pkg: apache - pkg: apache
- watch_in: - watch_in:
- service: apache
- cmd: apache-reload


{% if grains.os_family == 'Debian' %} {% if grains.os_family == 'Debian' %}
a2ensite {{ id }}: a2ensite {{ id }}:
- run - run
- require: - require:
- file: {{ id }} - file: {{ id }}
- watch_in:
- cmd: apache-reload
{% endif %} {% endif %}


{% endfor %} {% endfor %}

Loading…
Cancel
Save