44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
|
---
|
||
|
|
||
|
- name: Install dependencies
|
||
|
apt: name={{ item }}
|
||
|
with_items:
|
||
|
- git
|
||
|
- python3-flask
|
||
|
- python3-flaskext.wtf
|
||
|
- python3-passlib
|
||
|
- python3-pyldap
|
||
|
- python3-redis
|
||
|
- redis-server
|
||
|
- uwsgi
|
||
|
- uwsgi-plugin-python3
|
||
|
|
||
|
- name: Install bk-dss
|
||
|
git: repo=https://git.binary-kitchen.de/moepman/bk-dss.git dest=/opt/bk-dss depth=1 version=187bfe4f42f28f45e745ca4b1f8325d8622cec16
|
||
|
|
||
|
- name: Configure bk-dss
|
||
|
template: src=config.cfg.j2 dest=/opt/bk-dss/config.cfg
|
||
|
|
||
|
- name: Configure uwsgi
|
||
|
template: src=uwsgi.ini.j2 dest=/etc/uwsgi/apps-available/dss.ini
|
||
|
|
||
|
- 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
|
||
|
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/dss.binary-kitchen.de.key -out /etc/nginx/ssl/dss.binary-kitchen.de.crt -days 730 -subj "/CN=dss.binary-kitchen.de" creates=/etc/nginx/ssl/dss.binary-kitchen.de.crt
|
||
|
notify: Restart nginx
|
||
|
|
||
|
- name: Configure certificate manager
|
||
|
template: src=certs.j2 dest=/etc/acme/domains.d/{{ dss_domain }}.conf
|
||
|
notify: Run certmgr
|
||
|
|
||
|
- 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
|