2021-07-22 16:51:57 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
# TODO
|
|
|
|
# source code is not yet checked out from git
|
|
|
|
|
2021-08-17 20:55:18 +02:00
|
|
|
- name: Install docker-compose
|
|
|
|
apt: name=docker-compose
|
|
|
|
|
2022-01-19 19:36:36 +01:00
|
|
|
- name: Install git
|
|
|
|
apt: name=git
|
|
|
|
|
2021-07-22 16:51:57 +02:00
|
|
|
- name: Install systemd unit
|
|
|
|
template: src=workadventure.service.j2 dest=/lib/systemd/system/workadventure.service
|
|
|
|
notify:
|
|
|
|
- Reload systemd
|
|
|
|
- Restart workadventure
|
|
|
|
|
|
|
|
- name: Ensure certificates are available
|
|
|
|
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/{{ workadventure_domain }}.key -out /etc/nginx/ssl/{{ workadventure_domain }}.crt -days 730 -subj "/CN={{ workadventure_domain }}" creates=/etc/nginx/ssl/{{ workadventure_domain }}.crt
|
|
|
|
notify: Restart nginx
|
|
|
|
|
|
|
|
- name: Configure certificate manager for workadventure
|
|
|
|
template: src=certs.j2 dest=/etc/acertmgr/{{ workadventure_domain }}.conf
|
|
|
|
notify: Run acertmgr
|
|
|
|
|
|
|
|
- name: Configure vhost
|
|
|
|
template: src=vhost.j2 dest=/etc/nginx/sites-available/workadventure
|
|
|
|
notify: Restart nginx
|
|
|
|
|
|
|
|
- name: Enable vhost
|
|
|
|
file: src=/etc/nginx/sites-available/workadventure dest=/etc/nginx/sites-enabled/workadventure state=link
|
|
|
|
notify: Restart nginx
|
|
|
|
|
|
|
|
- name: Enable workadventure
|
|
|
|
service: name=workadventure enabled=yes
|