gvasalt/states/nginx/init.sls
Jan Dittberner 3fd146215f Rename roots to states
This commit renames the roots directory to states because it contains
salt states.
2016-01-31 21:16:14 +01:00

38 lines
763 B
Text

nginx:
pkg:
- installed
service.running:
- enable: True
- require:
- pkg: nginx
nginx-common:
pkg.installed
/etc/nginx/nginx.conf:
file.managed:
- source: salt://nginx/nginx.conf
- user: root
- group: root
- mode: 0644
- require:
- pkg: nginx-common
- watch_in:
- service: nginx
{% set nginx_ssl_keydir = salt['pillar.get']('nginx:sslkeydir', '/etc/nginx/ssl/private') %}
{% set nginx_ssl_certdir = salt['pillar.get']('nginx:sslcertdir', '/etc/nginx/ssl/certs') %}
{{ nginx_ssl_certdir }}:
file.directory:
- user: root
- group: root
- mode: 0755
- makedirs: True
{{ nginx_ssl_keydir }}:
file.directory:
- user: root
- group: root
- mode: 0750
- makedirs: True