2015-10-04 23:02:04 +02:00
|
|
|
include:
|
2016-01-29 18:34:40 +01:00
|
|
|
- gnuviechadmin.base
|
2016-02-06 14:23:05 +01:00
|
|
|
- gnuviechadmin.django
|
2015-10-04 23:02:04 +02:00
|
|
|
- webserver
|
|
|
|
|
2016-02-07 23:01:48 +01:00
|
|
|
gnuviechadmin-dev-packages:
|
2016-01-29 18:34:40 +01:00
|
|
|
pkg.installed:
|
2016-02-07 23:01:48 +01:00
|
|
|
- pkgs:
|
|
|
|
- libjpeg-dev
|
|
|
|
- libpq-dev
|
2016-01-29 18:34:40 +01:00
|
|
|
- require_in:
|
|
|
|
- pkg: gnuviechadmin-packages
|
2015-10-11 16:38:42 +02:00
|
|
|
|
2016-09-24 21:51:02 +02:00
|
|
|
python-cryptography:
|
2015-10-04 23:02:04 +02:00
|
|
|
pkg.installed:
|
2016-01-29 18:34:40 +01:00
|
|
|
- reload_modules: true
|
2015-10-04 23:02:04 +02:00
|
|
|
|
|
|
|
{% 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
|
2016-01-29 18:34:40 +01:00
|
|
|
- source: salt://gnuviechadmin/gva/gnuviechadmin.nginx
|
2015-10-04 23:02:04 +02:00
|
|
|
- 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
|