|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% set use_upstart = pillar.get('nginx', {}).get('use_upstart', true) %} |
|
|
|
|
|
{% if use_upstart %} |
|
|
nginx-old-init: |
|
|
nginx-old-init: |
|
|
file: |
|
|
file: |
|
|
- rename |
|
|
- rename |
|
|
|
|
|
|
|
|
- module: nginx-old-init |
|
|
- module: nginx-old-init |
|
|
- watch: |
|
|
- watch: |
|
|
- file: nginx-old-init |
|
|
- file: nginx-old-init |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
nginx: |
|
|
nginx: |
|
|
pkg.installed: |
|
|
pkg.installed: |
|
|
- name: nginx |
|
|
- name: nginx |
|
|
|
|
|
{% if use_upstart %} |
|
|
file: |
|
|
file: |
|
|
- managed |
|
|
- managed |
|
|
- name: /etc/init/nginx.conf |
|
|
- name: /etc/init/nginx.conf |
|
|
|
|
|
|
|
|
- pkg: nginx |
|
|
- pkg: nginx |
|
|
- file: nginx-old-init |
|
|
- file: nginx-old-init |
|
|
- module: nginx-old-init |
|
|
- module: nginx-old-init |
|
|
|
|
|
{% endif %} |
|
|
service: |
|
|
service: |
|
|
- running |
|
|
- running |
|
|
- enable: True |
|
|
- enable: True |
|
|
- restart: True |
|
|
- restart: True |
|
|
- watch: |
|
|
- watch: |
|
|
|
|
|
{% if use_upstart %} |
|
|
- file: nginx |
|
|
- file: nginx |
|
|
|
|
|
{% endif %} |
|
|
- file: /etc/nginx/nginx.conf |
|
|
- file: /etc/nginx/nginx.conf |
|
|
- file: /etc/nginx/conf.d/default.conf |
|
|
- file: /etc/nginx/conf.d/default.conf |
|
|
- file: /etc/nginx/conf.d/example_ssl.conf |
|
|
- file: /etc/nginx/conf.d/example_ssl.conf |
|
|
- pkg: nginx |
|
|
|
|
|
|
|
|
- pkg: nginx |