ansible/roles/matrix-riot/tasks/main.yml
2019-03-03 09:00:29 +01:00

51 lines
1.1 KiB
YAML

---
# Install HTTPS support for APT
- name: Install apt-transport-https
apt:
name: apt-transport-https
update_cache: true
# Add the repository into source list
- name: Configure riot repository
apt_repository:
repo: "deb https://riot.im/packages/debian/ {{ ansible_distribution_release }} main"
# Add the key
- name: Configure the apt key
apt_key:
url: https://riot.im/packages/debian/repo-key.asc
id: E019645248E8F4A1
# Install riot
- name: Install riot-web
apt:
name: riot-web
update_cache: true
# Install nginx
- name: Install nginx
apt:
name: nginx
# Configure nginx
- name: Configure nginx
template:
src: nginx-riot.j2
dest: /etc/nginx/sites-available/riot
mode: 0644
notify: Reload NGINX service
# Desactive useless nginx sites
- name: Deactivate the default NGINX site
file:
path: /etc/nginx/sites-enabled/default
state: absent
notify: Reload NGINX service
# Activate sites
- name: Activate sites
file:
src: /etc/nginx/sites-available/riot
dest: /etc/nginx/sites-enabled/riot
state: link
notify: Reload NGINX service