nginx-formula/nginx/ng/config.sls
2016-05-10 12:00:18 +01:00

21 lines
500 B
Plaintext

# nginx.ng.config
#
# Manages the main nginx server configuration file.
{% from 'nginx/ng/map.jinja' import nginx, sls_block with context %}
{% if nginx.install_from_source %}
nginx_log_directory:
file.directory:
- name: /var/log/nginx
{% endif %}
nginx_config:
file.managed:
{{ sls_block(nginx.server.opts) }}
- name: {{ nginx.lookup.conf_file }}
- source: salt://nginx/ng/files/nginx.conf
- template: jinja
- context:
config: {{ nginx.server.config|json() }}