瀏覽代碼

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

master
Alan McNea 11 年之前
父節點
當前提交
c863598ec7
共有 3 個文件被更改,包括 16 次插入7 次删除
  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 查看文件

@@ -21,14 +21,12 @@ a2dissite 000-default:
- require:
- pkg: apache

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

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

/etc/apache2/sites-available/default:

+ 9
- 0
apache/init.sls 查看文件

@@ -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


+ 3
- 1
apache/vhosts/standard.sls 查看文件

@@ -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 %}

Loading…
取消
儲存