gvasalt/roots/gnuviechadmin/webinterface.sls

40 lines
1 KiB
Text
Raw Normal View History

include:
- gnuviechadmin.base
- webserver
libpq-dev:
pkg.installed:
- require_in:
- pkg: gnuviechadmin-packages
2015-10-11 16:38:42 +02:00
python-m2crypto:
pkg.installed:
- reload_modules: true
{% import "webserver/sslcert.macros.sls" as sslcert %}
{% set domainname = salt['pillar.get']('gnuviechadmin:domainname') %}
{{ sslcert.key_cert(domainname) }}
/etc/nginx/sites-available/{{ domainname }}:
file.managed:
- user: root
- group: root
- mode: 0640
- source: salt://gnuviechadmin/gva/gnuviechadmin.nginx
- template: jinja
- context:
domainname: {{ domainname }}
ssl_keydir: {{ salt['pillar.get']('nginx:sslkeydir', '/etc/nginx/ssl/private') }}
ssl_certdir: {{ salt['pillar.get']('nginx:sslcertdir', '/etc/nginx/ssl/certs') }}
- require:
- pkg: nginx
/etc/nginx/sites-enabled/{{ domainname }}:
file.symlink:
- target: /etc/nginx/sites-available/{{ domainname }}
- require:
- file: /etc/nginx/sites-available/{{ domainname }}
- watch_in:
- service: nginx