From ee4f144b4a3a56f854edab29c83440cb6f8f6301 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Tue, 26 Mar 2019 08:30:02 +0100 Subject: [PATCH] Default configuration for Riot --- roles/matrix-riot/tasks/main.yml | 15 +++++++++++---- .../templates/{nginx-riot.j2 => nginx/riot.j2} | 0 2 files changed, 11 insertions(+), 4 deletions(-) rename roles/matrix-riot/templates/{nginx-riot.j2 => nginx/riot.j2} (100%) diff --git a/roles/matrix-riot/tasks/main.yml b/roles/matrix-riot/tasks/main.yml index 04be56f..4f72ef8 100644 --- a/roles/matrix-riot/tasks/main.yml +++ b/roles/matrix-riot/tasks/main.yml @@ -22,7 +22,6 @@ retries: 3 until: apt_key_result is succeeded -# Install riot - name: Install riot-web apt: name: riot-web @@ -31,7 +30,16 @@ retries: 3 until: apt_result is succeeded -# Install nginx +- name: Configure riot-web + lineinfile: + path: /opt/Riot/resources/webapp/config.json + regexp: '^\s*\"{{ item[0] }}' + line: " \"{{ item[0] }}\": \"{{ item[1] }}\"," + loop: + - ['default_hs_url', 'https://auro.re'] + - ['default_is_url', 'https://auro.re'] + - ['brand', 'Riot Aurore'] + - name: Install nginx apt: name: nginx @@ -39,10 +47,9 @@ retries: 3 until: apt_result is succeeded -# Configure nginx - name: Configure nginx template: - src: nginx-riot.j2 + src: nginx/riot.j2 dest: /etc/nginx/sites-available/riot mode: 0644 notify: Reload NGINX service diff --git a/roles/matrix-riot/templates/nginx-riot.j2 b/roles/matrix-riot/templates/nginx/riot.j2 similarity index 100% rename from roles/matrix-riot/templates/nginx-riot.j2 rename to roles/matrix-riot/templates/nginx/riot.j2