nginx-formula/nginx/common.sls

33 lines
596 B
Plaintext

/usr/share/nginx:
file:
- directory
{% for filename in ('default', 'example_ssl') %}
/etc/nginx/conf.d/{{ filename }}.conf:
file.absent
{% endfor %}
/etc/nginx:
file.directory:
- user: root
- group: root
/etc/nginx/nginx.conf:
file:
- managed
- template: jinja
- user: root
- group: root
- mode: 440
- source: salt://nginx/templates/config.jinja
- require:
- file: /etc/nginx
- pkg: nginx
{% for dir in ('sites-enabled', 'sites-available') %}
/etc/nginx/{{ dir }}:
file.directory:
- user: root
- group: root
{% endfor -%}