浏览代码

Merge pull request #26 from vincentfretin/patch-1

Don't execute a2ensite if the vhost is already enabled
tags/v0.37.4
Seth House 10 年前
父节点
当前提交
2c499ee376
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. +2
    -2
      apache/register_site.sls
  2. +1
    -0
      apache/vhosts/standard.sls

+ 2
- 2
apache/register_site.sls 查看文件

@@ -14,9 +14,9 @@ a2dissite {{ pillar['apache']['register-site'][site]['name'] }}:
{% endif %}
cmd.run:
{% if pillar['apache']['register-site'][site]['state'] == 'enabled' %}
- unless: ls /etc/apache2/sites-enabled/{{ pillar['apache']['register-site'][site]['name'] }}
- unless: test -f /etc/apache2/sites-enabled/{{ pillar['apache']['register-site'][site]['name'] }}
{% else %}
- onlyif: ls /etc/apache2/sites-enabled/{{ pillar['apache']['register-site'][site]['name'] }}
- onlyif: test -f /etc/apache2/sites-enabled/{{ pillar['apache']['register-site'][site]['name'] }}
{% endif %}
- order: 230
- require:

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

@@ -24,6 +24,7 @@ include:
a2ensite {{ id }}:
cmd:
- run
- unless: test -f /etc/apache2/sites-enabled/{{ id }}
- require:
- file: {{ id }}
- watch_in:

正在加载...
取消
保存