Browse Source

roles/riot-web: updated and tested

python3
Zolfa 4 years ago
parent
commit
b0f9c97955
Signed by: zolfa GPG Key ID: E1A43B038C4D6616
5 changed files with 90 additions and 35 deletions
  1. +6
    -1
      matrix.yaml
  2. +4
    -2
      roles/riot-web/defaults/main.yaml
  3. +0
    -1
      roles/riot-web/meta/main.yaml
  4. +30
    -26
      roles/riot-web/tasks/main.yaml
  5. +50
    -5
      roles/riot-web/templates/config.json.j2

+ 6
- 1
matrix.yaml View File

@ -19,9 +19,14 @@
roles:
- role: 'dns_record'
- role: 'reverse_proxy'
server_fqdns:
- 'matrix.{{ domain }}'
- 'riot.{{ domain }}'
- role: 'coturn'
- role: 'matrix-synapse'
# - role: 'riot-web'
server_fqdn: 'matrix.{{ domain }}'
- role: 'riot-web'
server_fqdn: 'riot.{{ domain }}'
- hosts: 'status'
roles:


+ 4
- 2
roles/riot-web/defaults/main.yaml View File

@ -1,4 +1,6 @@
# Based on https://github.com/vector-im/riot-web/releases
---
riot_web_version: "v0.15.4"
server_fqdn: "{{ ansible_hostname }}.lilik.it"
riot_web_version: "v1.6.0-rc.4"
server_fqdn: "riot.{{ domain }}"
matrix_fqdn: "matrix.{{ domain }}"
matrix_server_name: "{{ domain }}"

+ 0
- 1
roles/riot-web/meta/main.yaml View File

@ -2,5 +2,4 @@
dependencies:
- role: nginx
config_name: "riot"
server_fqdn: "{{ ansible_hostname }}.lilik.it"
parent_role_path: riot-web

+ 30
- 26
roles/riot-web/tasks/main.yaml View File

@ -1,30 +1,34 @@
- name: install git
apt:
name: "{{ item }}"
with_items:
- git
---
- name: 'create riot-web folder'
file:
path: '/srv/riot-web'
state: 'directory'
mode: '0755'
owner: 'www-data'
group: 'www-data'
tags:
- 'packages'
- file:
path: /srv/riot-web
state: directory
mode: 0755
owner: www-data
group: www-data
- unarchive:
src: "https://github.com/vector-im/riot-web/releases/download/{{ riot_web_version }}/riot-{{ riot_web_version }}.tar.gz"
dest: /srv/riot-web
remote_src: True
owner: www-data
group: www-data
- template:
src: riot.conf
dest: "/etc/nginx/locations/{{ server_fqdn }}/riot.conf"
- name: 'download riot-web'
unarchive:
src: "https://github.com/vector-im/riot-web/releases/download/\
{{ riot_web_version }}/riot-{{ riot_web_version }}.tar.gz"
dest: '/srv/riot-web'
remote_src: true
owner: 'www-data'
group: 'www-data'
tags:
- 'packages'
- name: 'configure nginx location'
template:
src: 'riot.conf'
dest: '/etc/nginx/locations/{{ server_fqdn }}/riot.conf'
notify:
- restart nginx
- 'reload nginx'
- template:
src: config.json.j2
dest: "/srv/riot-web/riot-{{ riot_web_version }}/config.json"
- name: 'configure riot web'
template:
src: 'config.json.j2'
dest: '/srv/riot-web/riot-{{ riot_web_version }}/config.json'
...

+ 50
- 5
roles/riot-web/templates/config.json.j2 View File

@ -1,10 +1,55 @@
{
"default_hs_url": "https://{{ ansible_hostname }}.lilik.it",
"default_is_url": "https://{{ ansible_hostname }}.lilik.it",
"brand": "LILiK",
"default_server_config": {
"m.homeserver": {
"base_url": "https://{{ matrix_fqdn }}",
"server_name": "{{ matrix_server_name }}"
}
},
"disable_custom_urls": false,
"disable_guests": false,
"disable_login_language_selector": false,
"disable_3pid_login": false,
"brand": "LILiK Riot",
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
"integrations_widgets_urls": [
"https://scalar.vector.im/_matrix/integrations/v1",
"https://scalar.vector.im/api",
"https://scalar-staging.vector.im/_matrix/integrations/v1",
"https://scalar-staging.vector.im/api",
"https://scalar-staging.riot.im/scalar/api"
],
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
"enableLabs": true,
"welcomeUserId": "@user:lilik.it"
"defaultCountryCode": "IT",
"showLabsSettings": true,
"features": {
"feature_pinning": "labs",
"feature_custom_status": "labs",
"feature_custom_tags": "labs",
"feature_state_counters": "labs"
},
"default_federate": true,
"default_theme": "light",
"roomDirectory": {
"servers": [
"matrix.org"
]
},
"welcomeUserId": "@riot-bot:matrix.org",
"piwik": {
"url": "https://piwik.riot.im/",
"whitelistedHSUrls": ["https://matrix.org"],
"whitelistedISUrls": ["https://vector.im", "https://matrix.org"],
"siteId": 1
},
"enable_presence_by_hs_url": {
"https://matrix.org": false,
"https://matrix-client.matrix.org": false
},
"settingDefaults": {
"breadcrumbs": true
},
"jitsi": {
"preferredDomain": "jitsi.riot.im"
}
}

Loading…
Cancel
Save