Jan Dittberner
95b2e521eb
Make sure that the jessie-backports repository is available and that the python-cryptography package from that repository is used.
44 lines
1.1 KiB
Text
44 lines
1.1 KiB
Text
include:
|
|
- gnuviechadmin.base
|
|
- gnuviechadmin.django
|
|
- webserver
|
|
|
|
gnuviechadmin-dev-packages:
|
|
pkg.installed:
|
|
- pkgs:
|
|
- libjpeg-dev
|
|
- libpq-dev
|
|
- require_in:
|
|
- pkg: gnuviechadmin-packages
|
|
|
|
python-cryptography:
|
|
pkg.latest:
|
|
- reload_modules: true
|
|
- fromrepo: jessie-backports
|
|
|
|
{% 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
|