2018-10-15 18:25:30 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
apt: name={{ item }}
|
2020-02-03 19:46:31 +01:00
|
|
|
loop:
|
2018-10-15 18:25:30 +02:00
|
|
|
- git
|
|
|
|
- python3-flask
|
|
|
|
- python3-flaskext.wtf
|
|
|
|
- python3-passlib
|
|
|
|
- python3-pyldap
|
|
|
|
- python3-redis
|
|
|
|
- redis-server
|
|
|
|
- uwsgi
|
|
|
|
- uwsgi-plugin-python3
|
|
|
|
|
|
|
|
- name: Install bk-dss
|
2019-02-23 23:34:23 +01:00
|
|
|
git: repo=https://git.binary-kitchen.de/moepman/bk-dss.git dest=/opt/bk-dss depth=1 version={{ dss_version }}
|
2019-03-18 22:18:43 +01:00
|
|
|
notify: Restart uwsgi
|
2018-10-15 18:25:30 +02:00
|
|
|
|
|
|
|
- name: Configure bk-dss
|
|
|
|
template: src=config.cfg.j2 dest=/opt/bk-dss/config.cfg
|
2019-03-18 22:18:43 +01:00
|
|
|
notify: Restart uwsgi
|
2018-10-15 18:25:30 +02:00
|
|
|
|
|
|
|
- name: Configure uwsgi
|
|
|
|
template: src=uwsgi.ini.j2 dest=/etc/uwsgi/apps-available/dss.ini
|
2019-03-18 22:18:43 +01:00
|
|
|
notify: Restart uwsgi
|
2018-10-15 18:25:30 +02:00
|
|
|
|
|
|
|
- name: Enable uwsgi
|
|
|
|
file: src=/etc/uwsgi/apps-available/dss.ini dest=/etc/uwsgi/apps-enabled/dss.ini state=link
|
|
|
|
notify: Restart uwsgi
|
|
|
|
|
|
|
|
- name: Ensure certificates are available
|
2019-05-13 20:22:02 +02:00
|
|
|
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/{{ dss_domain }}.key -out /etc/nginx/ssl/{{ dss_domain }}.crt -days 730 -subj "/CN={{ dss_domain }}" creates=/etc/nginx/ssl/{{ dss_domain }}.crt
|
2018-10-15 18:25:30 +02:00
|
|
|
notify: Restart nginx
|
|
|
|
|
|
|
|
- name: Configure certificate manager
|
2019-05-20 19:49:08 +02:00
|
|
|
template: src=certs.j2 dest=/etc/acertmgr/{{ dss_domain }}.conf
|
2019-02-23 23:54:24 +01:00
|
|
|
notify: Run acertmgr
|
2018-10-15 18:25:30 +02:00
|
|
|
|
|
|
|
- name: Configure vhosts
|
|
|
|
template: src=vhost.j2 dest=/etc/nginx/sites-available/dss
|
|
|
|
notify: Restart nginx
|
|
|
|
|
|
|
|
- name: Enable vhosts
|
|
|
|
file: src=/etc/nginx/sites-available/dss dest=/etc/nginx/sites-enabled/dss state=link
|
|
|
|
notify: Restart nginx
|