This commit is contained in:
Horvath Gergely
2020-03-07 13:57:44 +01:00
14 changed files with 158 additions and 17 deletions

View File

@ -21,9 +21,8 @@ matrix_appservice_webhooks_user_prefix: '_webhook'
# Controls the webhooks_PORT and MATRIX_PORT of the installation
matrix_appservice_webhooks_matrix_port: 6789
matrix_appservice_webhooks_webhooks_port: 6788
# Controls whether the appservice-webhooks container exposes its HTTP port (tcp/6788 in the container).
# Controls whether the appservice-webhooks container exposes its HTTP port (tcp/6789 in the container).
#
# Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:9999"), or empty string to not expose.
matrix_appservice_webhooks_container_http_host_bind_port: ''

View File

@ -23,7 +23,7 @@ ExecStart=/usr/bin/docker run --rm --name matrix-appservice-webhooks \
--cap-drop=ALL \
--network={{ matrix_docker_network }} \
{% if matrix_appservice_webhooks_container_http_host_bind_port %}
-p {{ matrix_appservice_webhooks_container_http_host_bind_port }}:{{matrix_appservice_webhooks_webhooks_port}} \
-p {{ matrix_appservice_webhooks_container_http_host_bind_port }}:{{matrix_appservice_webhooks_matrix_port}} \
{% endif %}
-v {{ matrix_appservice_webhooks_config_path }}:/config:z \
-v {{ matrix_appservice_webhooks_data_path }}:/data:z \

View File

@ -30,4 +30,4 @@ matrix_postgres_container_extra_arguments: []
# Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:5432"), or empty string to not expose.
matrix_postgres_container_postgres_bind_port: ""
matrix_postgres_tool_synapse_janitor: "https://raw.githubusercontent.com/xwiki-labs/synapse_scripts/0b3f035951932ceb396631de3fc701043b9723bc/synapse_janitor.sql"
matrix_postgres_tool_synapse_janitor: "https://raw.githubusercontent.com/xwiki-labs/synapse_scripts/a9188ff175ae581610f92d58ea6eac9a114d854b/synapse_janitor.sql"

View File

@ -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 &amp; 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.
#

View File

@ -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:

View 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"

View File

@ -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 }}
}
}

View File

@ -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 &amp; 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">

View File

@ -3,7 +3,7 @@
matrix_synapse_enabled: true
matrix_synapse_docker_image: "matrixdotorg/synapse:v1.11.0"
matrix_synapse_docker_image: "matrixdotorg/synapse:v1.11.1"
matrix_synapse_docker_image_force_pull: "{{ matrix_synapse_docker_image.endswith(':latest') }}"
matrix_synapse_base_path: "{{ matrix_base_data_path }}/synapse"