Merge branch 'master' of https://github.com/spantaleev/matrix-docker-ansible-deploy into raspberry-pi
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
matrix_riot_web_enabled: true
|
||||
|
||||
matrix_riot_web_docker_image: "vectorim/riot-web:v1.5.10"
|
||||
matrix_riot_web_docker_image: "vectorim/riot-web:v1.5.12"
|
||||
matrix_riot_web_docker_image_force_pull: "{{ matrix_riot_web_docker_image.endswith(':latest') }}"
|
||||
|
||||
matrix_riot_web_data_path: "{{ matrix_base_data_path }}/riot-web"
|
||||
@ -17,6 +17,7 @@ matrix_riot_web_container_extra_arguments: []
|
||||
matrix_riot_web_systemd_required_services_list: ['docker.service']
|
||||
|
||||
# Riot config.json customizations
|
||||
matrix_riot_web_default_server_name: "{{ matrix_domain }}"
|
||||
matrix_riot_web_default_hs_url: ""
|
||||
matrix_riot_web_default_is_url: ~
|
||||
matrix_riot_web_disable_custom_urls: true
|
||||
@ -31,6 +32,25 @@ matrix_riot_web_welcome_user_id: "@riot-bot:matrix.org"
|
||||
# Branding of riot web
|
||||
matrix_riot_web_brand: "Riot"
|
||||
|
||||
# URL to Logo on welcome page
|
||||
matrix_riot_web_welcome_logo: "welcome/images/logo.svg"
|
||||
|
||||
# URL of link on welcome image
|
||||
matrix_riot_web_welcome_logo_link: "https://riot.im"
|
||||
|
||||
matrix_riot_web_welcome_headline: "_t('Welcome to Riot.im')"
|
||||
matrix_riot_web_welcome_text: "_t('Decentralised, encrypted chat & collaboration powered by [matrix]')"
|
||||
|
||||
# Links, shown in footer of welcome page:
|
||||
# [{"text": "Link text", "url": "https://link.target"}, {"text": "Other link"}]
|
||||
matrix_riot_web_branding_authFooterLinks: ~
|
||||
|
||||
# URL to image, shown during Login
|
||||
matrix_riot_web_branding_authHeaderLogoUrl: "{{ matrix_riot_web_welcome_logo }}"
|
||||
|
||||
# URL to Wallpaper, shown in background of welcome page
|
||||
matrix_riot_web_branding_welcomeBackgroundUrl: ~
|
||||
|
||||
# By default, there's no Riot homepage (when logged in). If you wish to have one,
|
||||
# point this to a `home.html` template file on your local filesystem.
|
||||
matrix_riot_web_embedded_pages_home_path: ~
|
||||
@ -44,6 +64,21 @@ matrix_riot_web_registration_enabled: false
|
||||
# Controls whether Riot shows the presence features
|
||||
matrix_riot_web_enable_presence_by_hs_url: ~
|
||||
|
||||
# Controls whether custom riot-web themes will be installed.
|
||||
# When enabled, all themes found in the `matrix_riot_web_themes_repository_url` repository
|
||||
# will be installed and enabled automatically.
|
||||
matrix_riot_web_themes_enabled: false
|
||||
matrix_riot_web_themes_repository_url: https://github.com/aaronraimist/riot-web-themes
|
||||
|
||||
# Controls the `settingsDefault.custom_themes` setting of the riot-web configuration.
|
||||
# You can use this setting to define custom themes.
|
||||
#
|
||||
# Also, look at `matrix_riot_web_themes_enabled` for a way to pull in a bunch of custom themes automatically.
|
||||
# If you define your own themes here and set `matrix_riot_web_themes_enabled: true`, your themes will be preserved as well.
|
||||
#
|
||||
# Note that for a custom theme to work well, all riot-web/riot-desktop instances that you use must have the same theme installed.
|
||||
matrix_riot_web_settingDefaults_custom_themes: []
|
||||
|
||||
# Default riot-web configuration template which covers the generic use case.
|
||||
# You can customize it by controlling the various variables inside it.
|
||||
#
|
||||
|
@ -8,6 +8,12 @@
|
||||
- setup-all
|
||||
- setup-riot-web
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/prepare_riot_web_themes.yml"
|
||||
when: run_setup|bool
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-riot-web
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/setup_riot_web.yml"
|
||||
when: run_setup|bool
|
||||
tags:
|
||||
|
48
roles/matrix-riot-web/tasks/prepare_riot_web_themes.yml
Normal file
48
roles/matrix-riot-web/tasks/prepare_riot_web_themes.yml
Normal file
@ -0,0 +1,48 @@
|
||||
---
|
||||
|
||||
#
|
||||
# Tasks related to setting up riot-web themes
|
||||
#
|
||||
|
||||
- block:
|
||||
- name: Ensure riot-web themes repository is pulled
|
||||
git:
|
||||
repo: "{{ matrix_riot_web_themes_repository_url }}"
|
||||
dest: "{{ role_path }}/files/scratchpad/riot-web-themes"
|
||||
|
||||
- name: Find all riot-web theme files
|
||||
find:
|
||||
paths: "{{ role_path }}/files/scratchpad/riot-web-themes"
|
||||
patterns: "*.json"
|
||||
recurse: true
|
||||
register: matrix_riot_web_theme_file_list
|
||||
|
||||
- name: Read riot-web theme
|
||||
slurp:
|
||||
path: "{{ item.path }}"
|
||||
register: "matrix_riot_web_theme_file_contents"
|
||||
with_items: "{{ matrix_riot_web_theme_file_list.files }}"
|
||||
|
||||
- name: Load riot-web theme
|
||||
set_fact:
|
||||
matrix_riot_web_settingDefaults_custom_themes: "{{ matrix_riot_web_settingDefaults_custom_themes + [item['content'] | b64decode | from_json] }}"
|
||||
with_items: "{{ matrix_riot_web_theme_file_contents.results }}"
|
||||
|
||||
run_once: true
|
||||
delegate_to: 127.0.0.1
|
||||
become: false
|
||||
when: matrix_riot_web_themes_enabled|bool
|
||||
|
||||
|
||||
# #
|
||||
# # Tasks related to getting rid of riot-web themes (if it was previously enabled)
|
||||
# #
|
||||
|
||||
- name: Ensure riot-web themes repository is removed
|
||||
file:
|
||||
path: "{{ role_path }}/files/scratchpad/riot-web-themes"
|
||||
state: absent
|
||||
run_once: true
|
||||
delegate_to: 127.0.0.1
|
||||
become: false
|
||||
when: "not matrix_riot_web_themes_enabled|bool"
|
@ -1,6 +1,16 @@
|
||||
{
|
||||
"default_hs_url": {{ matrix_riot_web_default_hs_url|string|to_json }},
|
||||
"default_is_url": {{ matrix_riot_web_default_is_url|string|to_json }},
|
||||
"default_server_config": {
|
||||
"m.homeserver": {
|
||||
"base_url": {{ matrix_riot_web_default_hs_url|string|to_json }},
|
||||
"server_name": {{ matrix_riot_web_default_server_name|string|to_json }}
|
||||
},
|
||||
"m.identity_server": {
|
||||
"base_url": {{ matrix_riot_web_default_is_url|string|to_json }}
|
||||
}
|
||||
},
|
||||
"settingDefaults": {
|
||||
"custom_themes": {{ matrix_riot_web_settingDefaults_custom_themes|to_json }}
|
||||
},
|
||||
"disable_custom_urls": {{ matrix_riot_web_disable_custom_urls|to_json }},
|
||||
"disable_guests": {{ matrix_riot_web_disable_guests|to_json }},
|
||||
"brand": {{ matrix_riot_web_brand|to_json }},
|
||||
@ -19,5 +29,10 @@
|
||||
{% endif %}
|
||||
"embeddedPages": {
|
||||
"homeUrl": {{ matrix_riot_web_embedded_pages_home_url|string|to_json }}
|
||||
},
|
||||
"branding": {
|
||||
"authFooterLinks": {{ matrix_riot_web_branding_authFooterLinks|to_json }},
|
||||
"authHeaderLogoUrl": {{ matrix_riot_web_branding_authHeaderLogoUrl|to_json }},
|
||||
"welcomeBackgroundUrl": {{ matrix_riot_web_branding_welcomeBackgroundUrl|to_json }}
|
||||
}
|
||||
}
|
||||
|
@ -153,11 +153,11 @@ h1::after {
|
||||
</style>
|
||||
|
||||
<div class="mx_Parent">
|
||||
<a href="https://riot.im" target="_blank" rel="noopener">
|
||||
<img src="welcome/images/logo.svg" alt="" class="mx_Logo"/>
|
||||
<a href="{{ matrix_riot_web_welcome_logo_link }}" target="_blank" rel="noopener">
|
||||
<img src="{{ matrix_riot_web_welcome_logo }}" alt="" class="mx_Logo"/>
|
||||
</a>
|
||||
<h1 class="mx_Header_title">_t("Welcome to Riot.im")</h1>
|
||||
<h4 class="mx_Header_subtitle">_t("Decentralised, encrypted chat & collaboration powered by [matrix]")</h4>
|
||||
<h1 class="mx_Header_title">{{ matrix_riot_web_welcome_headline }}</h1>
|
||||
<h4 class="mx_Header_subtitle">{{ matrix_riot_web_welcome_text }}</h4>
|
||||
<div class="mx_ButtonGroup">
|
||||
<div class="mx_ButtonRow">
|
||||
<a href="#/login" class="mx_ButtonParent mx_ButtonSignIn mx_Button_iconSignIn">
|
||||
|
Reference in New Issue
Block a user