Browse Source

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

tags/v0.37.4
Philipp Marmet 8 years ago
parent
commit
01c9ca4a56
2 changed files with 3 additions and 6 deletions
  1. +1
    -2
      apache/no_default_vhost.sls
  2. +2
    -4
      apache/vhosts/standard.sls

+ 1
- 2
apache/no_default_vhost.sls View File

- 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 View File

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

Loading…
Cancel
Save