Move self-building git repository URLs to variables (stop hardcoding)

This commit is contained in:
Slavi Pantaleev 2020-11-28 21:34:14 +02:00
parent b354155d7c
commit be5263f397
33 changed files with 56 additions and 17 deletions

View file

@ -4,6 +4,7 @@
matrix_mautrix_facebook_enabled: true matrix_mautrix_facebook_enabled: true
matrix_mautrix_facebook_container_image_self_build: false matrix_mautrix_facebook_container_image_self_build: false
matrix_mautrix_facebook_container_image_self_build_repo: "https://github.com/tulir/mautrix-facebook.git"
# See: https://mau.dev/tulir/mautrix-facebook/container_registry # See: https://mau.dev/tulir/mautrix-facebook/container_registry
matrix_mautrix_facebook_docker_image: "{{ matrix_mautrix_facebook_docker_image_name_prefix }}tulir/mautrix-facebook:latest" matrix_mautrix_facebook_docker_image: "{{ matrix_mautrix_facebook_docker_image_name_prefix }}tulir/mautrix-facebook:latest"

View file

@ -32,7 +32,7 @@
- name: Ensure Mautrix Facebook repository is present on self-build - name: Ensure Mautrix Facebook repository is present on self-build
git: git:
repo: https://github.com/tulir/mautrix-facebook.git repo: "{{ matrix_mautrix_facebook_container_image_self_build_repo }}"
dest: "{{ matrix_mautrix_facebook_docker_src_files_path }}" dest: "{{ matrix_mautrix_facebook_docker_src_files_path }}"
# version: "{{ matrix_coturn_docker_image.split(':')[1] }}" # version: "{{ matrix_coturn_docker_image.split(':')[1] }}"
force: "yes" force: "yes"

View file

@ -4,6 +4,7 @@
matrix_mautrix_hangouts_enabled: true matrix_mautrix_hangouts_enabled: true
matrix_mautrix_hangouts_container_image_self_build: false matrix_mautrix_hangouts_container_image_self_build: false
matrix_mautrix_hangouts_container_image_self_build_repo: "https://github.com/tulir/mautrix-hangouts.git"
# See: https://mau.dev/tulir/mautrix-hangouts/container_registry # See: https://mau.dev/tulir/mautrix-hangouts/container_registry
matrix_mautrix_hangouts_docker_image: "{{ matrix_mautrix_hangouts_docker_image_name_prefix }}tulir/mautrix-hangouts:latest" matrix_mautrix_hangouts_docker_image: "{{ matrix_mautrix_hangouts_docker_image_name_prefix }}tulir/mautrix-hangouts:latest"

View file

@ -32,7 +32,7 @@
- name: Ensure Mautrix Hangots repository is present on self build - name: Ensure Mautrix Hangots repository is present on self build
git: git:
repo: https://github.com/tulir/mautrix-hangouts.git repo: "{{ matrix_mautrix_hangouts_container_image_self_build_repo }}"
dest: "{{ matrix_mautrix_hangouts_docker_src_files_path }}" dest: "{{ matrix_mautrix_hangouts_docker_src_files_path }}"
force: "yes" force: "yes"
register: matrix_mautrix_hangouts_git_pull_results register: matrix_mautrix_hangouts_git_pull_results

View file

@ -4,6 +4,7 @@
matrix_mx_puppet_discord_enabled: true matrix_mx_puppet_discord_enabled: true
matrix_mx_puppet_discord_container_image_self_build: false matrix_mx_puppet_discord_container_image_self_build: false
matrix_mx_puppet_discord_container_image_self_build_repo: "https://github.com/matrix-discord/mx-puppet-discord.git"
# Controls whether the mx-puppet-discord container exposes its HTTP port (tcp/8432 in the container). # Controls whether the mx-puppet-discord container exposes its HTTP port (tcp/8432 in the container).
# #

View file

@ -32,7 +32,7 @@
- name: Ensure MX Puppet Discord repository is present on self build - name: Ensure MX Puppet Discord repository is present on self build
git: git:
repo: https://github.com/matrix-discord/mx-puppet-discord.git repo: "{{ matrix_mx_puppet_discord_container_image_self_build_repo }}"
dest: "{{ matrix_mx_puppet_discord_docker_src_files_path }}" dest: "{{ matrix_mx_puppet_discord_docker_src_files_path }}"
force: "yes" force: "yes"
register: matrix_mx_puppet_discord_git_pull_results register: matrix_mx_puppet_discord_git_pull_results

View file

@ -4,6 +4,7 @@
matrix_mx_puppet_instagram_enabled: true matrix_mx_puppet_instagram_enabled: true
matrix_mx_puppet_instagram_container_image_self_build: false matrix_mx_puppet_instagram_container_image_self_build: false
matrix_mx_puppet_instagram_container_image_self_build_repo: "https://github.com/Sorunome/mx-puppet-instagram.git"
matrix_mx_puppet_instagram_docker_image: "{{ matrix_mx_puppet_instagram_docker_image_name_prefix }}sorunome/mx-puppet-instagram:latest" matrix_mx_puppet_instagram_docker_image: "{{ matrix_mx_puppet_instagram_docker_image_name_prefix }}sorunome/mx-puppet-instagram:latest"
matrix_mx_puppet_instagram_docker_image_name_prefix: "{{ 'localhost/' if matrix_mx_puppet_instagram_container_image_self_build else 'docker.io/' }}" matrix_mx_puppet_instagram_docker_image_name_prefix: "{{ 'localhost/' if matrix_mx_puppet_instagram_container_image_self_build else 'docker.io/' }}"

View file

@ -32,7 +32,7 @@
- name: Ensure mx-puppet-instagram repository is present on self build - name: Ensure mx-puppet-instagram repository is present on self build
git: git:
repo: https://github.com/Sorunome/mx-puppet-instagram.git repo: "{{ matrix_mx_puppet_instagram_container_image_self_build_repo }}"
dest: "{{ matrix_mx_puppet_instagram_docker_src_files_path }}" dest: "{{ matrix_mx_puppet_instagram_docker_src_files_path }}"
force: "yes" force: "yes"
register: matrix_mx_puppet_instagram_git_pull_results register: matrix_mx_puppet_instagram_git_pull_results

View file

@ -4,6 +4,7 @@
matrix_mx_puppet_skype_enabled: true matrix_mx_puppet_skype_enabled: true
matrix_mx_puppet_skype_container_image_self_build: false matrix_mx_puppet_skype_container_image_self_build: false
matrix_mx_puppet_skype_container_image_self_build_repo: "https://github.com/Sorunome/mx-puppet-skype.git"
matrix_mx_puppet_skype_docker_image: "{{ matrix_mx_puppet_skype_docker_image_name_prefix }}sorunome/mx-puppet-skype:latest" matrix_mx_puppet_skype_docker_image: "{{ matrix_mx_puppet_skype_docker_image_name_prefix }}sorunome/mx-puppet-skype:latest"
matrix_mx_puppet_skype_docker_image_name_prefix: "{{ 'localhost/' if matrix_mx_puppet_skype_container_image_self_build else 'docker.io/' }}" matrix_mx_puppet_skype_docker_image_name_prefix: "{{ 'localhost/' if matrix_mx_puppet_skype_container_image_self_build else 'docker.io/' }}"

View file

@ -32,7 +32,7 @@
- name: Ensure MX Puppet Skype repository is present on self build - name: Ensure MX Puppet Skype repository is present on self build
git: git:
repo: https://github.com/Sorunome/mx-puppet-skype.git repo: "{{ matrix_mx_puppet_skype_container_image_self_build_repo }}"
dest: "{{ matrix_mx_puppet_skype_docker_src_files_path }}" dest: "{{ matrix_mx_puppet_skype_docker_src_files_path }}"
force: "yes" force: "yes"
register: matrix_mx_puppet_skype_git_pull_results register: matrix_mx_puppet_skype_git_pull_results

View file

@ -4,6 +4,7 @@
matrix_mx_puppet_slack_enabled: true matrix_mx_puppet_slack_enabled: true
matrix_mx_puppet_slack_container_image_self_build: false matrix_mx_puppet_slack_container_image_self_build: false
matrix_mx_puppet_slack_container_image_self_build_repo: "https://github.com/Sorunome/mx-puppet-slack.git"
# Controls whether the mx-puppet-slack container exposes its HTTP port (tcp/8432 in the container). # Controls whether the mx-puppet-slack container exposes its HTTP port (tcp/8432 in the container).
# #

View file

@ -32,7 +32,7 @@
- name: Ensure MX Puppet Slack repository is present on self build - name: Ensure MX Puppet Slack repository is present on self build
git: git:
repo: https://github.com/Sorunome/mx-puppet-slack.git repo: "{{ matrix_mx_puppet_slack_container_image_self_build_repo }}"
dest: "{{ matrix_mx_puppet_slack_docker_src_files_path }}" dest: "{{ matrix_mx_puppet_slack_docker_src_files_path }}"
force: "yes" force: "yes"
register: matrix_mx_puppet_slack_git_pull_results register: matrix_mx_puppet_slack_git_pull_results

View file

@ -4,6 +4,7 @@
matrix_mx_puppet_steam_enabled: true matrix_mx_puppet_steam_enabled: true
matrix_mx_puppet_steam_container_image_self_build: false matrix_mx_puppet_steam_container_image_self_build: false
matrix_mx_puppet_steam_container_image_self_build_repo: "https://github.com/icewind1991/mx-puppet-steam.git"
# Controls whether the mx-puppet-steam container exposes its HTTP port (tcp/8432 in the container). # Controls whether the mx-puppet-steam container exposes its HTTP port (tcp/8432 in the container).
# #

View file

@ -32,7 +32,7 @@
- name: Ensure MX Puppet Steam repository is present on self build - name: Ensure MX Puppet Steam repository is present on self build
git: git:
repo: https://github.com/icewind1991/mx-puppet-steam.git repo: "{{ matrix_mx_puppet_steam_container_image_self_build_repo }}"
dest: "{{ matrix_mx_puppet_steam_docker_src_files_path }}" dest: "{{ matrix_mx_puppet_steam_docker_src_files_path }}"
force: "yes" force: "yes"
register: matrix_mx_puppet_steam_git_pull_results register: matrix_mx_puppet_steam_git_pull_results

View file

@ -4,6 +4,7 @@
matrix_mx_puppet_twitter_enabled: true matrix_mx_puppet_twitter_enabled: true
matrix_mx_puppet_twitter_container_image_self_build: false matrix_mx_puppet_twitter_container_image_self_build: false
matrix_mx_puppet_twitter_container_image_self_build_repo: "https://github.com/Sorunome/mx-puppet-twitter.git"
# Controls whether the mx-puppet-twitter container exposes its HTTP port (tcp/8432 in the container). # Controls whether the mx-puppet-twitter container exposes its HTTP port (tcp/8432 in the container).
# #

View file

@ -32,7 +32,7 @@
- name: Ensure MX Puppet Twitter repository is present on self build - name: Ensure MX Puppet Twitter repository is present on self build
git: git:
repo: https://github.com/Sorunome/mx-puppet-twitter.git repo: "{{ matrix_mx_puppet_twitter_container_image_self_build_repo }}"
dest: "{{ matrix_mx_puppet_twitter_docker_src_files_path }}" dest: "{{ matrix_mx_puppet_twitter_docker_src_files_path }}"
force: "yes" force: "yes"
register: matrix_mx_puppet_twitter_git_pull_results register: matrix_mx_puppet_twitter_git_pull_results

View file

@ -1,6 +1,7 @@
matrix_client_element_enabled: true matrix_client_element_enabled: true
matrix_client_element_container_image_self_build: false matrix_client_element_container_image_self_build: false
matrix_client_element_container_image_self_build_repo: "https://github.com/vector-im/riot-web.git"
matrix_client_element_docker_image: "{{ matrix_client_element_docker_image_name_prefix }}vectorim/element-web:v1.7.14" matrix_client_element_docker_image: "{{ matrix_client_element_docker_image_name_prefix }}vectorim/element-web:v1.7.14"
matrix_client_element_docker_image_name_prefix: "{{ 'localhost/' if matrix_client_element_container_image_self_build else 'docker.io/' }}" matrix_client_element_docker_image_name_prefix: "{{ 'localhost/' if matrix_client_element_container_image_self_build else 'docker.io/' }}"

View file

@ -26,7 +26,7 @@
- name: Ensure Element repository is present on self-build - name: Ensure Element repository is present on self-build
git: git:
repo: https://github.com/vector-im/riot-web.git repo: "{{ matrix_client_element_container_image_self_build_repo }}"
dest: "{{ matrix_client_element_docker_src_files_path }}" dest: "{{ matrix_client_element_docker_src_files_path }}"
version: "{{ matrix_client_element_docker_image.split(':')[1] }}" version: "{{ matrix_client_element_docker_image.split(':')[1] }}"
force: "yes" force: "yes"

View file

@ -1,6 +1,7 @@
matrix_coturn_enabled: true matrix_coturn_enabled: true
matrix_coturn_container_image_self_build: false matrix_coturn_container_image_self_build: false
matrix_coturn_container_image_self_build_repo: "https://github.com/instrumentisto/coturn-docker-image.git"
matrix_coturn_docker_image: "{{ matrix_coturn_docker_image_name_prefix }}instrumentisto/coturn:4.5.1.3" matrix_coturn_docker_image: "{{ matrix_coturn_docker_image_name_prefix }}instrumentisto/coturn:4.5.1.3"
matrix_coturn_docker_image_name_prefix: "{{ 'localhost/' if matrix_coturn_container_image_self_build else 'docker.io/' }}" matrix_coturn_docker_image_name_prefix: "{{ 'localhost/' if matrix_coturn_container_image_self_build else 'docker.io/' }}"

View file

@ -25,7 +25,7 @@
- name: Ensure Coturn repository is present on self-build - name: Ensure Coturn repository is present on self-build
git: git:
repo: https://github.com/instrumentisto/coturn-docker-image.git repo: "{{ matrix_coturn_container_image_self_build_repo }}"
dest: "{{ matrix_coturn_docker_src_files_path }}" dest: "{{ matrix_coturn_docker_src_files_path }}"
version: "{{ matrix_coturn_docker_image.split(':')[1] }}" version: "{{ matrix_coturn_docker_image.split(':')[1] }}"
force: "yes" force: "yes"

View file

@ -23,6 +23,7 @@ matrix_dynamic_dns_systemd_required_services_list: ['docker.service']
# Build the container from source when running in mode # Build the container from source when running in mode
matrix_dynamic_dns_container_image_self_build: false matrix_dynamic_dns_container_image_self_build: false
matrix_dynamic_dns_container_image_self_build_repo: "https://github.com/linuxserver/docker-ddclient.git"
# Config paths # Config paths
matrix_dynamic_dns_base_path: "{{ matrix_base_data_path }}/dynamic-dns" matrix_dynamic_dns_base_path: "{{ matrix_base_data_path }}/dynamic-dns"

View file

@ -23,7 +23,7 @@
- name: Ensure Dynamic DNS repository is present on self build - name: Ensure Dynamic DNS repository is present on self build
git: git:
repo: https://github.com/linuxserver/docker-ddclient.git repo: "{{ matrix_dynamic_dns_container_image_self_build_repo }}"
dest: "{{ matrix_dynamic_dns_docker_src_files_path }}" dest: "{{ matrix_dynamic_dns_docker_src_files_path }}"
force: "yes" force: "yes"
register: matrix_dynamic_dns_git_pull_results register: matrix_dynamic_dns_git_pull_results

View file

@ -4,6 +4,7 @@
matrix_ma1sd_enabled: true matrix_ma1sd_enabled: true
matrix_ma1sd_container_image_self_build: false matrix_ma1sd_container_image_self_build: false
matrix_ma1sd_container_image_self_build_repo: "https://github.com/ma1uta/ma1sd.git"
matrix_ma1sd_architecture: "amd64" matrix_ma1sd_architecture: "amd64"

View file

@ -52,7 +52,7 @@
- name: Ensure ma1sd repository is present on self-build - name: Ensure ma1sd repository is present on self-build
git: git:
repo: https://github.com/ma1uta/ma1sd.git repo: "{{ matrix_ma1sd_container_image_self_build_repo }}"
dest: "{{ matrix_ma1sd_docker_src_files_path }}" dest: "{{ matrix_ma1sd_docker_src_files_path }}"
version: "{{ matrix_ma1sd_docker_image.split(':')[1].split('-')[0] }}" version: "{{ matrix_ma1sd_docker_image.split(':')[1].split('-')[0] }}"
force: "yes" force: "yes"

View file

@ -4,6 +4,7 @@
matrix_registration_enabled: true matrix_registration_enabled: true
matrix_registration_container_image_self_build: false matrix_registration_container_image_self_build: false
matrix_registration_container_image_self_build_repo: "https://github.com/ZerataX/matrix-registration"
matrix_registration_base_path: "{{ matrix_base_data_path }}/matrix-registration" matrix_registration_base_path: "{{ matrix_base_data_path }}/matrix-registration"
matrix_registration_config_path: "{{ matrix_registration_base_path }}/config" matrix_registration_config_path: "{{ matrix_registration_base_path }}/config"
@ -15,7 +16,6 @@ matrix_registration_version: "v0.7.0"
matrix_registration_docker_image: "{{ matrix_registration_docker_image_name_prefix }}devture/zeratax-matrix-registration:{{ matrix_registration_version }}" matrix_registration_docker_image: "{{ matrix_registration_docker_image_name_prefix }}devture/zeratax-matrix-registration:{{ matrix_registration_version }}"
matrix_registration_docker_image_name_prefix: "{{ 'localhost/' if matrix_registration_container_image_self_build else 'docker.io/' }}" matrix_registration_docker_image_name_prefix: "{{ 'localhost/' if matrix_registration_container_image_self_build else 'docker.io/' }}"
matrix_registration_docker_image_force_pull: "{{ matrix_registration_docker_image.endswith(':latest') }}" matrix_registration_docker_image_force_pull: "{{ matrix_registration_docker_image.endswith(':latest') }}"
matrix_registration_docker_repo: "https://github.com/ZerataX/matrix-registration"
# A list of extra arguments to pass to the container # A list of extra arguments to pass to the container
matrix_registration_container_extra_arguments: [] matrix_registration_container_extra_arguments: []

View file

@ -28,7 +28,7 @@
- name: Ensure matrix-registration repository is present when self-building - name: Ensure matrix-registration repository is present when self-building
git: git:
repo: "{{ matrix_registration_docker_repo }}" repo: "{{ matrix_registration_container_image_self_build_repo }}"
dest: "{{ matrix_registration_docker_src_files_path }}" dest: "{{ matrix_registration_docker_src_files_path }}"
version: "{{ matrix_registration_version }}" version: "{{ matrix_registration_version }}"
force: "yes" force: "yes"

View file

@ -9,3 +9,12 @@
- "matrix_registration_shared_secret" - "matrix_registration_shared_secret"
- "matrix_registration_admin_secret" - "matrix_registration_admin_secret"
- "matrix_registration_server_location" - "matrix_registration_server_location"
- name: (Deprecation) Catch and report renamed settings
fail:
msg: >-
Your configuration contains a variable, which now has a different name.
Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
when: "item.old in vars"
with_items:
- {'old': 'matrix_registration_docker_repo', 'new': 'matrix_registration_container_image_self_build_repo'}

View file

@ -4,7 +4,8 @@
matrix_synapse_admin_enabled: true matrix_synapse_admin_enabled: true
matrix_synapse_admin_container_self_build: false matrix_synapse_admin_container_self_build: false
matrix_synapse_admin_docker_repo: "https://github.com/Awesome-Technologies/synapse-admin.git" matrix_synapse_admin_container_self_build_repo: "https://github.com/Awesome-Technologies/synapse-admin.git"
matrix_synapse_admin_docker_src_files_path: "{{ matrix_base_data_path }}/synapse-admin/docker-src" matrix_synapse_admin_docker_src_files_path: "{{ matrix_base_data_path }}/synapse-admin/docker-src"
matrix_synapse_admin_docker_image: "{{ matrix_synapse_admin_docker_image_name_prefix }}awesometechnologies/synapse-admin:0.5.0" matrix_synapse_admin_docker_image: "{{ matrix_synapse_admin_docker_image_name_prefix }}awesometechnologies/synapse-admin:0.5.0"

View file

@ -2,6 +2,12 @@
tags: tags:
- always - always
- import_tasks: "{{ role_path }}/tasks/validate_config.yml"
when: run_setup|bool
tags:
- setup-all
- setup-synapse-admin
- import_tasks: "{{ role_path }}/tasks/setup.yml" - import_tasks: "{{ role_path }}/tasks/setup.yml"
tags: tags:
- setup-all - setup-all

View file

@ -14,7 +14,7 @@
- name: Ensure matrix-synapse-admin repository is present when self-building - name: Ensure matrix-synapse-admin repository is present when self-building
git: git:
repo: "{{ matrix_synapse_admin_docker_repo }}" repo: "{{ matrix_synapse_admin_container_self_build_repo }}"
dest: "{{ matrix_synapse_admin_docker_src_files_path }}" dest: "{{ matrix_synapse_admin_docker_src_files_path }}"
force: "yes" force: "yes"
register: matrix_synapse_admin_git_pull_results register: matrix_synapse_admin_git_pull_results

View file

@ -0,0 +1,10 @@
---
- name: (Deprecation) Catch and report renamed settings
fail:
msg: >-
Your configuration contains a variable, which now has a different name.
Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
when: "item.old in vars"
with_items:
- {'old': 'matrix_synapse_admin_docker_repo', 'new': 'matrix_synapse_admin_container_self_build_repo'}

View file

@ -4,6 +4,7 @@
matrix_synapse_enabled: true matrix_synapse_enabled: true
matrix_synapse_container_image_self_build: false matrix_synapse_container_image_self_build: false
matrix_synapse_container_image_self_build_repo: "https://github.com/matrix-org/synapse.git"
matrix_synapse_docker_image: "{{ matrix_synapse_docker_image_name_prefix }}matrixdotorg/synapse:v1.23.0" matrix_synapse_docker_image: "{{ matrix_synapse_docker_image_name_prefix }}matrixdotorg/synapse:v1.23.0"
matrix_synapse_docker_image_name_prefix: "{{ 'localhost/' if matrix_synapse_container_image_self_build else 'docker.io/' }}" matrix_synapse_docker_image_name_prefix: "{{ 'localhost/' if matrix_synapse_container_image_self_build else 'docker.io/' }}"

View file

@ -20,7 +20,7 @@
- name: Ensure Synapse repository is present on self-build - name: Ensure Synapse repository is present on self-build
git: git:
repo: https://github.com/matrix-org/synapse.git repo: "{{ matrix_synapse_container_image_self_build_repo }}"
dest: "{{ matrix_synapse_docker_src_files_path }}" dest: "{{ matrix_synapse_docker_src_files_path }}"
version: "{{ matrix_synapse_docker_image.split(':')[1] }}" version: "{{ matrix_synapse_docker_image.split(':')[1] }}"
force: "yes" force: "yes"