浏览代码

use default style for cmd.run: instead of cmd: - run

master
Philipp Marmet 8 年前
父节点
当前提交
01c9ca4a56
共有 2 个文件被更改,包括 3 次插入6 次删除
  1. +1
    -2
      apache/no_default_vhost.sls
  2. +2
    -4
      apache/vhosts/standard.sls

+ 1
- 2
apache/no_default_vhost.sls 查看文件

- apache - apache


a2dissite 000-default.conf: a2dissite 000-default.conf:
cmd:
- run
cmd.run:
- unless: test ! -f /etc/apache2/sites-enabled/000-default.conf - unless: test ! -f /etc/apache2/sites-enabled/000-default.conf
- require: - require:
- pkg: apache - pkg: apache

+ 2
- 4
apache/vhosts/standard.sls 查看文件

{% if grains.os_family == 'Debian' %} {% if grains.os_family == 'Debian' %}
{% if site.get('enabled', True) %} {% if site.get('enabled', True) %}
a2ensite {{ id }}{{ apache.confext }}: a2ensite {{ id }}{{ apache.confext }}:
cmd:
- run
cmd.run:
- unless: test -f /etc/apache2/sites-enabled/{{ id }}{{ apache.confext }} - unless: test -f /etc/apache2/sites-enabled/{{ id }}{{ apache.confext }}
- require: - require:
- file: /etc/apache2/sites-available/{{ id }}{{ apache.confext }} - file: /etc/apache2/sites-available/{{ id }}{{ apache.confext }}
- module: apache-reload - module: apache-reload
{% else %} {% else %}
a2dissite {{ id }}{{ apache.confext }}: a2dissite {{ id }}{{ apache.confext }}:
cmd:
- run
cmd.run:
- onlyif: test -f /etc/apache2/sites-enabled/{{ id }}{{ apache.confext }} - onlyif: test -f /etc/apache2/sites-enabled/{{ id }}{{ apache.confext }}
- require: - require:
- file: /etc/apache2/sites-available/{{ id }}{{ apache.confext }} - file: /etc/apache2/sites-available/{{ id }}{{ apache.confext }}

正在加载...
取消
保存