Change states to use short-dec style
This commit is contained in:
parent
5cad45126e
commit
137482d175
@ -2,8 +2,7 @@
|
|||||||
{% set use_upstart = salt['pillar.get']('nginx:use_upstart', nginx['use_upstart']) %}
|
{% set use_upstart = salt['pillar.get']('nginx:use_upstart', nginx['use_upstart']) %}
|
||||||
{% if use_upstart %}
|
{% if use_upstart %}
|
||||||
nginx-old-init:
|
nginx-old-init:
|
||||||
file:
|
file.rename:
|
||||||
- rename
|
|
||||||
- name: /usr/share/nginx/init.d
|
- name: /usr/share/nginx/init.d
|
||||||
- source: /etc/init.d/nginx
|
- source: /etc/init.d/nginx
|
||||||
- require_in:
|
- require_in:
|
||||||
@ -13,8 +12,7 @@ nginx-old-init:
|
|||||||
- force: True
|
- force: True
|
||||||
{% if grains.get('os_family') == 'Debian' %}
|
{% if grains.get('os_family') == 'Debian' %}
|
||||||
# Don't dpkg-divert if we are not Debian based!
|
# Don't dpkg-divert if we are not Debian based!
|
||||||
cmd:
|
cmd.wait:
|
||||||
- wait
|
|
||||||
- name: dpkg-divert --divert /usr/share/nginx/init.d --add /etc/init.d/nginx
|
- name: dpkg-divert --divert /usr/share/nginx/init.d --add /etc/init.d/nginx
|
||||||
- require:
|
- require:
|
||||||
- module: nginx-old-init
|
- module: nginx-old-init
|
||||||
@ -23,8 +21,7 @@ nginx-old-init:
|
|||||||
- require_in:
|
- require_in:
|
||||||
- file: nginx
|
- file: nginx
|
||||||
{% endif %}
|
{% endif %}
|
||||||
module:
|
module.wait:
|
||||||
- wait
|
|
||||||
- name: cmd.run
|
- name: cmd.run
|
||||||
- cmd: kill `cat /var/run/nginx.pid`
|
- cmd: kill `cat /var/run/nginx.pid`
|
||||||
- watch:
|
- watch:
|
||||||
@ -40,8 +37,7 @@ nginx-old-init:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
nginx-old-init-disable:
|
nginx-old-init-disable:
|
||||||
cmd:
|
cmd.run:
|
||||||
- run
|
|
||||||
- name: {{ nginx.old_init_disable }}
|
- name: {{ nginx.old_init_disable }}
|
||||||
- require{{ _in }}:
|
- require{{ _in }}:
|
||||||
- module: nginx-old-init
|
- module: nginx-old-init
|
||||||
@ -95,8 +91,7 @@ nginx:
|
|||||||
pkg.installed:
|
pkg.installed:
|
||||||
- name: {{ nginx.package }}
|
- name: {{ nginx.package }}
|
||||||
{% if use_upstart %}
|
{% if use_upstart %}
|
||||||
file:
|
file.managed:
|
||||||
- managed
|
|
||||||
- name: /etc/init/nginx.conf
|
- name: /etc/init/nginx.conf
|
||||||
- template: jinja
|
- template: jinja
|
||||||
- user: root
|
- user: root
|
||||||
@ -108,8 +103,7 @@ nginx:
|
|||||||
- file: nginx-old-init
|
- file: nginx-old-init
|
||||||
- module: nginx-old-init
|
- module: nginx-old-init
|
||||||
{% endif %}
|
{% endif %}
|
||||||
service:
|
service.running:
|
||||||
- running
|
|
||||||
- enable: True
|
- enable: True
|
||||||
- restart: True
|
- restart: True
|
||||||
- watch:
|
- watch:
|
||||||
|
Loading…
Reference in New Issue
Block a user