From 0ea7cb5d1812a88e57c65bc6163455e698efa0d8 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Tue, 22 Nov 2022 21:36:49 +0200 Subject: [PATCH] Remove various init.yml files - initialize systemd services, etc., statically (not at runtime) --- group_vars/matrix_servers | 256 +++++++++++++++++- .../custom/matrix-backup-borg/tasks/init.yml | 4 - .../custom/matrix-backup-borg/tasks/main.yml | 4 - roles/custom/matrix-base/defaults/main.yml | 7 + roles/custom/matrix-base/vars/main.yml | 7 - .../matrix-bot-buscarron/tasks/init.yml | 5 - .../matrix-bot-buscarron/tasks/main.yml | 4 - roles/custom/matrix-bot-go-neb/tasks/init.yml | 5 - roles/custom/matrix-bot-go-neb/tasks/main.yml | 4 - .../custom/matrix-bot-honoroit/tasks/init.yml | 5 - .../custom/matrix-bot-honoroit/tasks/main.yml | 4 - .../tasks/init.yml | 5 - .../tasks/main.yml | 4 - .../tasks/init.yml | 5 - .../tasks/main.yml | 4 - roles/custom/matrix-bot-maubot/tasks/init.yml | 5 - .../custom/matrix-bot-mjolnir/tasks/init.yml | 11 - .../custom/matrix-bot-mjolnir/tasks/main.yml | 4 - .../matrix-bot-postmoogle/tasks/init.yml | 5 - .../matrix-bot-postmoogle/tasks/main.yml | 4 - .../tasks/init.yml | 29 -- .../tasks/main.yml | 4 - .../tasks/init.yml | 36 --- .../tasks/main.yml | 4 - .../tasks/init.yml | 28 -- .../tasks/main.yml | 4 - .../tasks/init.yml | 43 --- .../tasks/init.yml | 36 --- .../tasks/init.yml | 22 -- .../tasks/main.yml | 4 - .../tasks/init.yml | 21 -- .../tasks/main.yml | 4 - .../matrix-bridge-heisenbridge/tasks/init.yml | 29 -- .../matrix-bridge-heisenbridge/tasks/main.yml | 4 - .../matrix-bridge-hookshot/tasks/init.yml | 28 -- .../tasks/init.yml | 21 -- .../tasks/main.yml | 3 - .../tasks/init.yml | 27 -- .../tasks/init.yml | 27 -- .../tasks/init.yml | 27 -- .../tasks/init.yml | 28 -- .../tasks/main.yml | 4 - .../tasks/init.yml | 22 -- .../tasks/main.yml | 4 - .../tasks/init.yml | 27 -- .../tasks/init.yml | 29 -- .../tasks/main.yml | 4 - .../tasks/init.yml | 21 -- .../tasks/main.yml | 3 - .../tasks/init.yml | 28 -- .../tasks/main.yml | 4 - .../tasks/init.yml | 28 -- .../tasks/main.yml | 4 - .../tasks/init.yml | 28 -- .../tasks/main.yml | 4 - .../tasks/init.yml | 27 -- .../tasks/init.yml | 28 -- .../tasks/main.yml | 4 - .../tasks/init.yml | 27 -- roles/custom/matrix-bridge-sms/tasks/init.yml | 30 -- roles/custom/matrix-bridge-sms/tasks/main.yml | 4 - .../matrix-cactus-comments/tasks/init.yml | 21 -- .../custom/matrix-client-cinny/tasks/init.yml | 11 - .../custom/matrix-client-cinny/tasks/main.yml | 4 - .../matrix-client-element/tasks/init.yml | 12 - .../matrix-client-element/tasks/main.yml | 4 - .../matrix-client-hydrogen/tasks/init.yml | 11 - .../matrix-client-hydrogen/tasks/main.yml | 4 - roles/custom/matrix-conduit/tasks/init.yml | 5 - roles/custom/matrix-conduit/tasks/main.yml | 4 - roles/custom/matrix-corporal/tasks/init.yml | 11 - roles/custom/matrix-corporal/tasks/main.yml | 4 - roles/custom/matrix-coturn/tasks/init.yml | 15 - roles/custom/matrix-coturn/tasks/main.yml | 4 - .../custom/matrix-dendrite/defaults/main.yml | 16 +- roles/custom/matrix-dendrite/tasks/init.yml | 5 - roles/custom/matrix-dendrite/tasks/main.yml | 4 - roles/custom/matrix-dimension/tasks/init.yml | 4 - roles/custom/matrix-dimension/tasks/main.yml | 4 - .../custom/matrix-dynamic-dns/tasks/init.yml | 11 - .../custom/matrix-dynamic-dns/tasks/main.yml | 4 - .../custom/matrix-email2matrix/tasks/init.yml | 5 - .../custom/matrix-email2matrix/tasks/main.yml | 4 - roles/custom/matrix-etherpad/tasks/init.yml | 4 - roles/custom/matrix-grafana/tasks/init.yml | 5 - roles/custom/matrix-grafana/tasks/main.yml | 4 - roles/custom/matrix-jitsi/tasks/init.yml | 10 - roles/custom/matrix-jitsi/tasks/main.yml | 4 - .../matrix-jitsi/tasks/validate_config.yml | 5 + .../tasks/init.yml | 10 - roles/custom/matrix-ma1sd/tasks/init.yml | 11 - roles/custom/matrix-ma1sd/tasks/main.yml | 4 - roles/custom/matrix-mailer/tasks/init.yml | 11 - roles/custom/matrix-mailer/tasks/main.yml | 4 - .../custom/matrix-nginx-proxy/tasks/init.yml | 9 - .../custom/matrix-nginx-proxy/tasks/main.yml | 3 - roles/custom/matrix-ntfy/tasks/init.yml | 5 - roles/custom/matrix-ntfy/tasks/main.yml | 4 - .../matrix-postgres-backup/tasks/init.yml | 5 - .../matrix-postgres-backup/tasks/main.yml | 4 - roles/custom/matrix-postgres/tasks/init.yml | 5 - roles/custom/matrix-postgres/tasks/main.yml | 4 - .../tasks/init.yml | 4 - .../tasks/init.yml | 4 - roles/custom/matrix-prometheus/tasks/init.yml | 5 - roles/custom/matrix-prometheus/tasks/main.yml | 4 - roles/custom/matrix-redis/tasks/init.yml | 5 - roles/custom/matrix-redis/tasks/main.yml | 4 - .../custom/matrix-registration/tasks/init.yml | 10 - roles/custom/matrix-sygnal/tasks/init.yml | 5 - roles/custom/matrix-sygnal/tasks/main.yml | 4 - .../matrix-synapse-admin/tasks/init.yml | 10 - .../tasks/init.yml | 5 - .../tasks/main.yml | 4 - .../tasks/setup_install.yml | 2 +- roles/custom/matrix-synapse/defaults/main.yml | 16 +- .../tasks/ext/s3-storage-provider/init.yml | 5 - roles/custom/matrix-synapse/tasks/init.yml | 17 -- 118 files changed, 281 insertions(+), 1212 deletions(-) delete mode 100644 roles/custom/matrix-backup-borg/tasks/init.yml delete mode 100644 roles/custom/matrix-base/vars/main.yml delete mode 100644 roles/custom/matrix-bot-buscarron/tasks/init.yml delete mode 100644 roles/custom/matrix-bot-go-neb/tasks/init.yml delete mode 100644 roles/custom/matrix-bot-honoroit/tasks/init.yml delete mode 100644 roles/custom/matrix-bot-matrix-registration-bot/tasks/init.yml delete mode 100644 roles/custom/matrix-bot-matrix-reminder-bot/tasks/init.yml delete mode 100644 roles/custom/matrix-bot-mjolnir/tasks/init.yml delete mode 100644 roles/custom/matrix-bot-postmoogle/tasks/init.yml delete mode 100644 roles/custom/matrix-bridge-appservice-discord/tasks/init.yml delete mode 100644 roles/custom/matrix-bridge-appservice-irc/tasks/init.yml delete mode 100644 roles/custom/matrix-bridge-appservice-kakaotalk/tasks/init.yml delete mode 100644 roles/custom/matrix-bridge-beeper-linkedin/tasks/init.yml delete mode 100644 roles/custom/matrix-bridge-go-skype-bridge/tasks/init.yml delete mode 100644 roles/custom/matrix-bridge-heisenbridge/tasks/init.yml delete mode 100644 roles/custom/matrix-bridge-mautrix-discord/tasks/init.yml delete mode 100644 roles/custom/matrix-bridge-mautrix-instagram/tasks/init.yml delete mode 100644 roles/custom/matrix-bridge-mautrix-signal/tasks/init.yml delete mode 100644 roles/custom/matrix-bridge-mautrix-twitter/tasks/init.yml delete mode 100644 roles/custom/matrix-bridge-mautrix-whatsapp/tasks/init.yml delete mode 100644 roles/custom/matrix-bridge-mx-puppet-discord/tasks/init.yml delete mode 100644 roles/custom/matrix-bridge-mx-puppet-groupme/tasks/init.yml delete mode 100644 roles/custom/matrix-bridge-mx-puppet-instagram/tasks/init.yml delete mode 100644 roles/custom/matrix-bridge-mx-puppet-steam/tasks/init.yml delete mode 100644 roles/custom/matrix-bridge-sms/tasks/init.yml delete mode 100644 roles/custom/matrix-client-cinny/tasks/init.yml delete mode 100644 roles/custom/matrix-client-element/tasks/init.yml delete mode 100644 roles/custom/matrix-client-hydrogen/tasks/init.yml delete mode 100644 roles/custom/matrix-conduit/tasks/init.yml delete mode 100644 roles/custom/matrix-corporal/tasks/init.yml delete mode 100644 roles/custom/matrix-coturn/tasks/init.yml delete mode 100644 roles/custom/matrix-dendrite/tasks/init.yml delete mode 100644 roles/custom/matrix-dimension/tasks/init.yml delete mode 100644 roles/custom/matrix-dynamic-dns/tasks/init.yml delete mode 100644 roles/custom/matrix-email2matrix/tasks/init.yml delete mode 100644 roles/custom/matrix-grafana/tasks/init.yml delete mode 100644 roles/custom/matrix-jitsi/tasks/init.yml delete mode 100644 roles/custom/matrix-ma1sd/tasks/init.yml delete mode 100644 roles/custom/matrix-mailer/tasks/init.yml delete mode 100644 roles/custom/matrix-nginx-proxy/tasks/init.yml delete mode 100644 roles/custom/matrix-ntfy/tasks/init.yml delete mode 100644 roles/custom/matrix-postgres-backup/tasks/init.yml delete mode 100644 roles/custom/matrix-postgres/tasks/init.yml delete mode 100644 roles/custom/matrix-prometheus/tasks/init.yml delete mode 100644 roles/custom/matrix-redis/tasks/init.yml delete mode 100644 roles/custom/matrix-sygnal/tasks/init.yml delete mode 100644 roles/custom/matrix-synapse-reverse-proxy-companion/tasks/init.yml delete mode 100644 roles/custom/matrix-synapse/tasks/ext/s3-storage-provider/init.yml diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 163eaab36..d51f20d4f 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -19,6 +19,254 @@ # Also see `devture_docker_sdk_for_python_installation_enabled`. matrix_playbook_docker_installation_enabled: true +# This list is not exhaustive and final. +# Synapse workers are still injected into the list at runtime. +# Additional JVB workers (playbooks/jitsi_jvb.yml -- roles/custom/matrix-jitsi/tasks/init_additional_jvb.yml) override this variable at runtime as well. +matrix_systemd_services_list: | + {{ + (['matrix-backup-borg.timer'] if matrix_backup_borg_enabled else []) + + + (['matrix-bot-buscarron.service'] if matrix_bot_buscarron_enabled else []) + + + (['matrix-bot-go-neb.service'] if matrix_bot_go_neb_enabled else []) + + + (['matrix-bot-honoroit.service'] if matrix_bot_honoroit_enabled else []) + + + (['matrix-bot-matrix-registration-bot.service'] if matrix_bot_matrix_registration_bot_enabled else []) + + + (['matrix-bot-matrix-reminder-bot.service'] if matrix_bot_matrix_reminder_bot_enabled else []) + + + (['matrix-bot-maubot.service'] if matrix_bot_maubot_enabled else []) + + + (['matrix-bot-mjolnir.service'] if matrix_bot_mjolnir_enabled else []) + + + (['matrix-bot-postmoogle.service'] if matrix_bot_postmoogle_enabled else []) + + + (['matrix-appservice-discord.service'] if matrix_appservice_discord_enabled else []) + + + (['matrix-appservice-irc.service'] if matrix_appservice_irc_enabled else []) + + + (['matrix-appservice-kakaotalk.service', 'matrix-appservice-kakaotalk-node.service'] if matrix_appservice_kakaotalk_enabled else []) + + + (['matrix-appservice-slack.service'] if matrix_appservice_slack_enabled else []) + + + (['matrix-appservice-webhooks.service'] if matrix_appservice_webhooks_enabled else []) + + + (['matrix-beeper-linkedin.service'] if matrix_beeper_linkedin_enabled else []) + + + (['matrix-go-skype-bridge.service'] if matrix_go_skype_bridge_enabled else []) + + + (['matrix-heisenbridge.service'] if matrix_heisenbridge_enabled else []) + + + (['matrix-hookshot.service'] if matrix_hookshot_enabled else []) + + + (['matrix-mautrix-discord.service'] if matrix_mautrix_discord_enabled else []) + + + (['matrix-mautrix-facebook.service'] if matrix_mautrix_facebook_enabled else []) + + + (['matrix-mautrix-googlechat.service'] if matrix_mautrix_googlechat_enabled else []) + + + (['matrix-mautrix-hangouts.service'] if matrix_mautrix_hangouts_enabled else []) + + + (['matrix-mautrix-instagram.service'] if matrix_mautrix_instagram_enabled else []) + + + (['matrix-mautrix-signal.service', 'matrix-mautrix-signal-daemon.service'] if matrix_mautrix_signal_enabled else []) + + + (['matrix-mautrix-telegram.service'] if matrix_mautrix_telegram_enabled else []) + + + (['matrix-mautrix-twitter.service'] if matrix_mautrix_twitter_enabled else []) + + + (['matrix-mautrix-whatsapp.service'] if matrix_mautrix_whatsapp_enabled else []) + + + (['matrix-mx-puppet-discord.service'] if matrix_mx_puppet_discord_enabled else []) + + + (['matrix-mx-puppet-groupme.service'] if matrix_mx_puppet_groupme_enabled else []) + + + (['matrix-mx-puppet-instagram.service'] if matrix_mx_puppet_instagram_enabled else []) + + + (['matrix-mx-puppet-slack.service'] if matrix_mx_puppet_slack_enabled else []) + + + (['matrix-mx-puppet-steam.service'] if matrix_mx_puppet_steam_enabled else []) + + + (['matrix-mx-puppet-twitter.service'] if matrix_mx_puppet_twitter_enabled else []) + + + (['matrix-sms-bridge.service'] if matrix_sms_bridge_enabled else []) + + + (['matrix-cactus-comments.service'] if matrix_cactus_comments_enabled else []) + + + (['matrix-client-cinny.service'] if matrix_client_cinny_enabled else []) + + + (['matrix-client-element.service'] if matrix_client_element_enabled else []) + + + (['matrix-client-hydrogen.service'] if matrix_client_hydrogen_enabled else []) + + + (['matrix-' + matrix_homeserver_implementation + '.service']) + + + (['matrix-corporal.service'] if matrix_corporal_enabled else []) + + + (['matrix-coturn.service'] if matrix_coturn_enabled else []) + + + (['matrix-coturn-reload.timer'] if (matrix_coturn_enabled and matrix_coturn_tls_enabled) else []) + + + (['matrix-dimension.service'] if matrix_dimension_enabled else []) + + + (['matrix-dynamic-dns.service'] if matrix_dynamic_dns_enabled else []) + + + (['matrix-email2matrix.service'] if matrix_email2matrix_enabled else []) + + + (['matrix-etherpad.service'] if matrix_etherpad_enabled else []) + + + (['matrix-grafana.service'] if matrix_grafana_enabled else []) + + + (['matrix-jitsi-web.service', 'matrix-jitsi-prosody.service', 'matrix-jitsi-jicofo.service', 'matrix-jitsi-jvb.service'] if matrix_jitsi_enabled else []) + + + (['matrix-ldap-registration-proxy.service'] if matrix_ldap_registration_proxy_enabled else []) + + + (['matrix-ma1sd.service'] if matrix_ma1sd_enabled else []) + + + (['matrix-mailer.service'] if matrix_mailer_enabled else []) + + + (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else []) + + + (matrix_ssl_renewal_systemd_units_list | selectattr('applicable') | map(attribute='name')) + + + (['matrix-ntfy.service'] if matrix_ntfy_enabled else []) + + + (['matrix-postgres.service'] if matrix_postgres_enabled else []) + + + (['matrix-postgres-backup.service'] if matrix_postgres_backup_enabled else []) + + + (['matrix-prometheus.service'] if matrix_prometheus_enabled else []) + + + (['matrix-prometheus-node-exporter.service'] if matrix_prometheus_node_exporter_enabled else []) + + + (['matrix-prometheus-postgres-exporter.service'] if matrix_prometheus_postgres_exporter_enabled else []) + + + (['matrix-redis'] if matrix_redis_enabled else []) + + + (['matrix-registration.service'] if matrix_registration_enabled else []) + + + (['matrix-sygnal.service'] if matrix_sygnal_enabled else []) + + + (['matrix-goofys.service'] if matrix_s3_media_store_enabled else []) + + + (['matrix-synapse-s3-storage-provider-migrate.timer'] if matrix_synapse_ext_synapse_s3_storage_provider_enabled else []) + + + (['matrix-synapse-admin.service'] if matrix_synapse_admin_enabled else []) + + + (['matrix-synapse-reverse-proxy-companion.service'] if matrix_synapse_reverse_proxy_companion_enabled else []) + }} + +matrix_homeserver_app_service_config_files_auto: | + {{ + (['--mount type=bind,src=' + matrix_appservice_discord_config_path + '/registration.yaml,dst=/matrix-appservice-discord-registration.yaml,ro'] if matrix_appservice_discord_enabled else []) + + + (['--mount type=bind,src=' + matrix_appservice_irc_config_path + '/registration.yaml,dst=/matrix-appservice-irc-registration.yaml,ro'] if matrix_appservice_irc_enabled else []) + + + (['--mount type=bind,src=' + matrix_appservice_kakaotalk_config_path + '/registration.yaml,dst=/matrix-appservice-kakaotalk-registration.yaml,ro'] if matrix_appservice_kakaotalk_enabled else []) + + + (['--mount type=bind,src=' + matrix_appservice_slack_config_path + '/slack-registration.yaml,dst=/matrix-appservice-slack-registration.yaml,ro'] if matrix_appservice_slack_enabled else []) + + + (['--mount type=bind,src=' + matrix_appservice_webhooks_config_path + '/webhooks-registration.yaml,dst=/matrix-appservice-webhooks-registration.yaml,ro'] if matrix_appservice_webhooks_enabled else []) + + + (['--mount type=bind,src=' + matrix_beeper_linkedin_config_path + '/registration.yaml,dst=/matrix-beeper-linkedin-registration.yaml,ro'] if matrix_beeper_linkedin_enabled else []) + + + (['--mount type=bind,src=' + matrix_go_skype_bridge_config_path + '/registration.yaml,dst=/matrix-go-skype-bridge-registration.yaml,ro'] if matrix_go_skype_bridge_enabled else []) + + + (['--mount type=bind,src=' + matrix_heisenbridge_base_path + '/registration.yaml,dst=/heisenbridge-registration.yaml,ro'] if matrix_heisenbridge_enabled else []) + + + (['--mount type=bind,src=' + matrix_hookshot_base_path + '/registration.yml,dst=/hookshot-registration.yml,ro'] if matrix_hookshot_enabled else []) + + + (['--mount type=bind,src=' + matrix_mautrix_discord_config_path + '/registration.yaml,dst=/matrix-mautrix-discord-registration.yaml,ro'] if matrix_mautrix_discord_enabled else []) + + + (['--mount type=bind,src=' + matrix_mautrix_facebook_config_path + '/registration.yaml,dst=/matrix-mautrix-facebook-registration.yaml,ro'] if matrix_mautrix_facebook_enabled else []) + + + (['--mount type=bind,src=' + matrix_mautrix_googlechat_config_path + '/registration.yaml,dst=/matrix-mautrix-googlechat-registration.yaml,ro'] if matrix_mautrix_googlechat_enabled else []) + + + (['--mount type=bind,src=' + matrix_mautrix_hangouts_config_path + '/registration.yaml,dst=/matrix-mautrix-hangouts-registration.yaml,ro'] if matrix_mautrix_hangouts_enabled else []) + + + (['--mount type=bind,src=' + matrix_mautrix_instagram_config_path + '/registration.yaml,dst=/matrix-mautrix-instagram-registration.yaml,ro'] if matrix_mautrix_instagram_enabled else []) + + + (['--mount type=bind,src=' + matrix_mautrix_signal_config_path + '/registration.yaml,dst=/matrix-mautrix-signal-registration.yaml,ro'] if matrix_mautrix_signal_enabled else []) + + + (['--mount type=bind,src=' + matrix_mautrix_telegram_config_path + '/registration.yaml,dst=/matrix-mautrix-telegram-registration.yaml,ro'] if matrix_mautrix_telegram_enabled else []) + + + (['--mount type=bind,src=' + matrix_mautrix_twitter_config_path + '/registration.yaml,dst=/matrix-mautrix-twitter-registration.yaml,ro'] if matrix_mautrix_twitter_enabled else []) + + + (['--mount type=bind,src=' + matrix_mautrix_whatsapp_config_path + '/registration.yaml,dst=/matrix-mautrix-whatsapp-registration.yaml,ro'] if matrix_mautrix_whatsapp_enabled else []) + + + (['--mount type=bind,src=' + matrix_mx_puppet_discord_config_path + '/registration.yaml,dst=/matrix-mx-puppet-discord-registration.yaml,ro'] if matrix_mx_puppet_discord_enabled else []) + + + (['--mount type=bind,src=' + matrix_mx_puppet_groupme_config_path + '/registration.yaml,dst=/matrix-mx-puppet-groupme-registration.yaml,ro'] if matrix_mx_puppet_groupme_enabled else []) + + + (['--mount type=bind,src=' + matrix_mx_puppet_instagram_config_path + '/registration.yaml,dst=/matrix-mx-puppet-instagram-registration.yaml,ro'] if matrix_mx_puppet_instagram_enabled else []) + + + (['--mount type=bind,src=' + matrix_mx_puppet_slack_config_path + '/registration.yaml,dst=/matrix-mx-puppet-slack-registration.yaml,ro'] if matrix_mx_puppet_slack_enabled else []) + + + (['--mount type=bind,src=' + matrix_mx_puppet_steam_config_path + '/registration.yaml,dst=/matrix-mx-puppet-steam-registration.yaml,ro'] if matrix_mx_puppet_steam_enabled else []) + + + (['--mount type=bind,src=' + matrix_mx_puppet_twitter_config_path + '/registration.yaml,dst=/matrix-mx-puppet-twitter-registration.yaml,ro'] if matrix_mx_puppet_twitter_enabled else []) + + + (['--mount type=bind,src=' + matrix_sms_bridge_config_path + '/registration.yaml,dst=/matrix-sms-bridge-registration.yaml,ro'] if matrix_sms_bridge_enabled else []) + + + (['--mount type=bind,src=' + matrix_cactus_comments_app_service_config_file + ',dst=/matrix-cactus-comments.yaml,ro'] if matrix_cactus_comments_enabled else []) + }} + +matrix_homeserver_additional_config_files_auto: | + {{ + (['/matrix-appservice-discord-registration.yaml'] if matrix_appservice_discord_enabled else []) + + + (['/matrix-appservice-irc-registration.yaml'] if matrix_appservice_irc_enabled else []) + + + (['/matrix-appservice-kakaotalk-registration.yaml'] if matrix_appservice_kakaotalk_enabled else []) + + + (['/matrix-appservice-slack-registration.yaml'] if matrix_appservice_slack_enabled else []) + + + (['/matrix-appservice-webhooks-registration.yaml'] if matrix_appservice_webhooks_enabled else []) + + + (['/matrix-beeper-linkedin-registration.yaml'] if matrix_beeper_linkedin_enabled else []) + + + (['/matrix-go-skype-bridge-registration.yaml'] if matrix_go_skype_bridge_enabled else []) + + + (['/heisenbridge-registration.yaml'] if matrix_heisenbridge_enabled else []) + + + (['/hookshot-registration.yml'] if matrix_hookshot_enabled else []) + + + (['/matrix-mautrix-discord-registration.yaml'] if matrix_mautrix_discord_enabled else []) + + + (['/matrix-mautrix-facebook-registration.yaml'] if matrix_mautrix_facebook_enabled else []) + + + (['/matrix-mautrix-googlechat-registration.yaml'] if matrix_mautrix_googlechat_enabled else []) + + + (['/matrix-mautrix-hangouts-registration.yaml'] if matrix_mautrix_hangouts_enabled else []) + + + (['/matrix-mautrix-instagram-registration.yaml'] if matrix_mautrix_instagram_enabled else []) + + + (['/matrix-mautrix-signal-registration.yaml'] if matrix_mautrix_signal_enabled else []) + + + (['/matrix-mautrix-telegram-registration.yaml'] if matrix_mautrix_telegram_enabled else []) + + + (['/matrix-mautrix-twitter-registration.yaml'] if matrix_mautrix_twitter_enabled else []) + + + (['/matrix-mautrix-whatsapp-registration.yaml'] if matrix_mautrix_whatsapp_enabled else []) + + + (['/matrix-mx-puppet-discord-registration.yaml'] if matrix_mx_puppet_discord_enabled else []) + + + (['/matrix-mx-puppet-groupme-registration.yaml'] if matrix_mx_puppet_groupme_enabled else []) + + + (['/matrix-mx-puppet-instagram-registration.yaml'] if matrix_mx_puppet_instagram_enabled else []) + + + (['/matrix-mx-puppet-slack-registration.yaml'] if matrix_mx_puppet_slack_enabled else []) + + + (['/matrix-mx-puppet-steam-registration.yaml'] if matrix_mx_puppet_steam_enabled else []) + + + (['/matrix-mx-puppet-twitter-registration.yaml'] if matrix_mx_puppet_twitter_enabled else []) + + + (['/matrix-sms-bridge-registration.yaml'] if matrix_sms_bridge_enabled else []) + + + (['/matrix-cactus-comments.yaml'] if matrix_cactus_comments_enabled else []) + }} + ######################################################################## # # # /Playbook # @@ -2413,8 +2661,8 @@ matrix_synapse_redis_enabled: "{{ matrix_redis_enabled }}" matrix_synapse_redis_host: "{{ 'matrix-redis' if matrix_redis_enabled else '' }}" matrix_synapse_redis_password: "{{ matrix_redis_connection_password if matrix_redis_enabled else '' }}" -matrix_synapse_container_runtime_injected_arguments: "{{ matrix_homeserver_container_runtime_injected_arguments }}" -matrix_synapse_app_service_runtime_injected_config_files: "{{ matrix_homeserver_app_service_runtime_injected_config_files }}" +matrix_synapse_container_extra_arguments_auto: "{{ matrix_homeserver_container_extra_arguments_auto }}" +matrix_synapse_app_service_config_files_auto: "{{ matrix_homeserver_app_service_config_files_auto }}" ###################################################################### # @@ -2723,8 +2971,8 @@ matrix_dendrite_systemd_wanted_services_list: | (['matrix-coturn.service'] if matrix_coturn_enabled else []) }} -matrix_dendrite_container_runtime_injected_arguments: "{{ matrix_homeserver_container_runtime_injected_arguments }}" -matrix_dendrite_app_service_runtime_injected_config_files: "{{ matrix_homeserver_app_service_runtime_injected_config_files }}" +matrix_dendrite_container_extra_arguments_auto: "{{ matrix_homeserver_container_extra_arguments_auto }}" +matrix_dendrite_app_service_config_files_auto: "{{ matrix_homeserver_app_service_config_files_auto }}" ###################################################################### # diff --git a/roles/custom/matrix-backup-borg/tasks/init.yml b/roles/custom/matrix-backup-borg/tasks/init.yml deleted file mode 100644 index d57f12491..000000000 --- a/roles/custom/matrix-backup-borg/tasks/init.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-backup-borg.timer'] }}" - when: matrix_backup_borg_enabled | bool diff --git a/roles/custom/matrix-backup-borg/tasks/main.yml b/roles/custom/matrix-backup-borg/tasks/main.yml index 5de4559c5..e8c020a47 100644 --- a/roles/custom/matrix-backup-borg/tasks/main.yml +++ b/roles/custom/matrix-backup-borg/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_backup_borg_enabled | bool" tags: diff --git a/roles/custom/matrix-base/defaults/main.yml b/roles/custom/matrix-base/defaults/main.yml index 534db0785..d54da23ed 100644 --- a/roles/custom/matrix-base/defaults/main.yml +++ b/roles/custom/matrix-base/defaults/main.yml @@ -253,6 +253,13 @@ matrix_well_known_matrix_server_enabled: true # See `matrix_homeserver_admin_contacts`, `matrix_homeserver_support_url`, etc. matrix_well_known_matrix_support_enabled: false +# This will contain a list of enabled services that the playbook is managing. +# Each component is expected to append its service name to this list. +matrix_systemd_services_list: [] + +matrix_homeserver_container_extra_arguments_auto: [] +matrix_homeserver_app_service_config_files_auto: [] + # Variables to Control which parts of our roles run. run_postgres_import: true run_postgres_upgrade: true diff --git a/roles/custom/matrix-base/vars/main.yml b/roles/custom/matrix-base/vars/main.yml deleted file mode 100644 index 3578666f3..000000000 --- a/roles/custom/matrix-base/vars/main.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# This will contain a list of enabled services that the playbook is managing. -# Each component is expected to append its service name to this list. -matrix_systemd_services_list: [] - -matrix_homeserver_container_runtime_injected_arguments: [] -matrix_homeserver_app_service_runtime_injected_config_files: [] diff --git a/roles/custom/matrix-bot-buscarron/tasks/init.yml b/roles/custom/matrix-bot-buscarron/tasks/init.yml deleted file mode 100644 index a1f5751db..000000000 --- a/roles/custom/matrix-bot-buscarron/tasks/init.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-buscarron.service'] }}" - when: matrix_bot_buscarron_enabled | bool diff --git a/roles/custom/matrix-bot-buscarron/tasks/main.yml b/roles/custom/matrix-bot-buscarron/tasks/main.yml index e6712262f..0d575393f 100644 --- a/roles/custom/matrix-bot-buscarron/tasks/main.yml +++ b/roles/custom/matrix-bot-buscarron/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_bot_buscarron_enabled | bool" tags: diff --git a/roles/custom/matrix-bot-go-neb/tasks/init.yml b/roles/custom/matrix-bot-go-neb/tasks/init.yml deleted file mode 100644 index 9d5b4f896..000000000 --- a/roles/custom/matrix-bot-go-neb/tasks/init.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-go-neb.service'] }}" - when: matrix_bot_go_neb_enabled | bool diff --git a/roles/custom/matrix-bot-go-neb/tasks/main.yml b/roles/custom/matrix-bot-go-neb/tasks/main.yml index 27487ac53..4fc22e591 100644 --- a/roles/custom/matrix-bot-go-neb/tasks/main.yml +++ b/roles/custom/matrix-bot-go-neb/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_bot_go_neb_enabled | bool" tags: diff --git a/roles/custom/matrix-bot-honoroit/tasks/init.yml b/roles/custom/matrix-bot-honoroit/tasks/init.yml deleted file mode 100644 index 1b03373c8..000000000 --- a/roles/custom/matrix-bot-honoroit/tasks/init.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-honoroit.service'] }}" - when: matrix_bot_honoroit_enabled | bool diff --git a/roles/custom/matrix-bot-honoroit/tasks/main.yml b/roles/custom/matrix-bot-honoroit/tasks/main.yml index 5de468fe7..09fab3272 100644 --- a/roles/custom/matrix-bot-honoroit/tasks/main.yml +++ b/roles/custom/matrix-bot-honoroit/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_bot_honoroit_enabled | bool" tags: diff --git a/roles/custom/matrix-bot-matrix-registration-bot/tasks/init.yml b/roles/custom/matrix-bot-matrix-registration-bot/tasks/init.yml deleted file mode 100644 index 91b1f095d..000000000 --- a/roles/custom/matrix-bot-matrix-registration-bot/tasks/init.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-matrix-registration-bot.service'] }}" - when: matrix_bot_matrix_registration_bot_enabled | bool diff --git a/roles/custom/matrix-bot-matrix-registration-bot/tasks/main.yml b/roles/custom/matrix-bot-matrix-registration-bot/tasks/main.yml index cc162e991..5f44faac5 100644 --- a/roles/custom/matrix-bot-matrix-registration-bot/tasks/main.yml +++ b/roles/custom/matrix-bot-matrix-registration-bot/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_bot_matrix_registration_bot_enabled | bool" tags: diff --git a/roles/custom/matrix-bot-matrix-reminder-bot/tasks/init.yml b/roles/custom/matrix-bot-matrix-reminder-bot/tasks/init.yml deleted file mode 100644 index 0a5ba4821..000000000 --- a/roles/custom/matrix-bot-matrix-reminder-bot/tasks/init.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-matrix-reminder-bot.service'] }}" - when: matrix_bot_matrix_reminder_bot_enabled | bool diff --git a/roles/custom/matrix-bot-matrix-reminder-bot/tasks/main.yml b/roles/custom/matrix-bot-matrix-reminder-bot/tasks/main.yml index 19c3823fa..8340ef67e 100644 --- a/roles/custom/matrix-bot-matrix-reminder-bot/tasks/main.yml +++ b/roles/custom/matrix-bot-matrix-reminder-bot/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_bot_matrix_reminder_bot_enabled | bool" tags: diff --git a/roles/custom/matrix-bot-maubot/tasks/init.yml b/roles/custom/matrix-bot-maubot/tasks/init.yml index ccb5956e6..f7aec6273 100644 --- a/roles/custom/matrix-bot-maubot/tasks/init.yml +++ b/roles/custom/matrix-bot-maubot/tasks/init.yml @@ -1,10 +1,5 @@ --- -- name: Add maubot to the systemd service list - ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-maubot.service'] }}" - when: matrix_bot_maubot_enabled | bool - - name: Configure nginx for maubot block: - name: Generate Maubot proxying configuration for matrix-nginx-proxy diff --git a/roles/custom/matrix-bot-mjolnir/tasks/init.yml b/roles/custom/matrix-bot-mjolnir/tasks/init.yml deleted file mode 100644 index 2b6053428..000000000 --- a/roles/custom/matrix-bot-mjolnir/tasks/init.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the Mjolnir image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_bot_mjolnir_container_image_self_build and matrix_bot_mjolnir_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-mjolnir.service'] }}" - when: matrix_bot_mjolnir_enabled | bool diff --git a/roles/custom/matrix-bot-mjolnir/tasks/main.yml b/roles/custom/matrix-bot-mjolnir/tasks/main.yml index 867201a20..02a22bb1c 100644 --- a/roles/custom/matrix-bot-mjolnir/tasks/main.yml +++ b/roles/custom/matrix-bot-mjolnir/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_bot_mjolnir_enabled | bool" tags: diff --git a/roles/custom/matrix-bot-postmoogle/tasks/init.yml b/roles/custom/matrix-bot-postmoogle/tasks/init.yml deleted file mode 100644 index 16b781713..000000000 --- a/roles/custom/matrix-bot-postmoogle/tasks/init.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-postmoogle.service'] }}" - when: matrix_bot_postmoogle_enabled | bool diff --git a/roles/custom/matrix-bot-postmoogle/tasks/main.yml b/roles/custom/matrix-bot-postmoogle/tasks/main.yml index cbe590e17..4e2ab51b9 100644 --- a/roles/custom/matrix-bot-postmoogle/tasks/main.yml +++ b/roles/custom/matrix-bot-postmoogle/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_bot_postmoogle_enabled | bool" tags: diff --git a/roles/custom/matrix-bridge-appservice-discord/tasks/init.yml b/roles/custom/matrix-bridge-appservice-discord/tasks/init.yml deleted file mode 100644 index 915d73021..000000000 --- a/roles/custom/matrix-bridge-appservice-discord/tasks/init.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -# If the matrix-synapse role is not used, `matrix_synapse_role_executed` won't exist. -# We don't want to fail in such cases. -- name: Fail if matrix-synapse role already executed - ansible.builtin.fail: - msg: >- - The matrix-bridge-appservice-discord role needs to execute before the matrix-synapse role. - when: "matrix_appservice_discord_enabled and matrix_synapse_role_executed | default(False)" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-appservice-discord.service'] }}" - when: matrix_appservice_discord_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_appservice_discord_config_path }}/registration.yaml,dst=/matrix-appservice-discord-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-appservice-discord-registration.yaml"] - }} - when: matrix_appservice_discord_enabled | bool diff --git a/roles/custom/matrix-bridge-appservice-discord/tasks/main.yml b/roles/custom/matrix-bridge-appservice-discord/tasks/main.yml index 7ab8f3a65..249668583 100644 --- a/roles/custom/matrix-bridge-appservice-discord/tasks/main.yml +++ b/roles/custom/matrix-bridge-appservice-discord/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_appservice_discord_enabled | bool" tags: diff --git a/roles/custom/matrix-bridge-appservice-irc/tasks/init.yml b/roles/custom/matrix-bridge-appservice-irc/tasks/init.yml deleted file mode 100644 index 031271279..000000000 --- a/roles/custom/matrix-bridge-appservice-irc/tasks/init.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the matrix-appservice-irc image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_appservice_irc_container_image_self_build and matrix_appservice_irc_enabled" - -# If the matrix-synapse role is not used, `matrix_synapse_role_executed` won't exist. -# We don't want to fail in such cases. -- name: Fail if matrix-synapse role already executed - ansible.builtin.fail: - msg: >- - The matrix-bridge-appservice-irc role needs to execute before the matrix-synapse role. - when: "matrix_appservice_irc_enabled | bool and matrix_synapse_role_executed | default(False)" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-appservice-irc.service'] }}" - when: matrix_appservice_irc_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_appservice_irc_config_path }}/registration.yaml,dst=/matrix-appservice-irc-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-appservice-irc-registration.yaml"] - }} - when: matrix_appservice_irc_enabled | bool diff --git a/roles/custom/matrix-bridge-appservice-irc/tasks/main.yml b/roles/custom/matrix-bridge-appservice-irc/tasks/main.yml index 41d2017b0..f66b729ba 100644 --- a/roles/custom/matrix-bridge-appservice-irc/tasks/main.yml +++ b/roles/custom/matrix-bridge-appservice-irc/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_appservice_irc_enabled | bool" tags: diff --git a/roles/custom/matrix-bridge-appservice-kakaotalk/tasks/init.yml b/roles/custom/matrix-bridge-appservice-kakaotalk/tasks/init.yml deleted file mode 100644 index 6112b5cce..000000000 --- a/roles/custom/matrix-bridge-appservice-kakaotalk/tasks/init.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the appservice-kakaotalk image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_appservice_kakaotalk_container_image_self_build and matrix_appservice_kakaotalk_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-appservice-kakaotalk.service', 'matrix-appservice-kakaotalk-node.service'] }}" - when: matrix_appservice_kakaotalk_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_appservice_kakaotalk_config_path }}/registration.yaml,dst=/matrix-appservice-kakaotalk-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-appservice-kakaotalk-registration.yaml"] - }} - when: matrix_appservice_kakaotalk_enabled | bool diff --git a/roles/custom/matrix-bridge-appservice-kakaotalk/tasks/main.yml b/roles/custom/matrix-bridge-appservice-kakaotalk/tasks/main.yml index dfb286f2c..a4dffd76f 100644 --- a/roles/custom/matrix-bridge-appservice-kakaotalk/tasks/main.yml +++ b/roles/custom/matrix-bridge-appservice-kakaotalk/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_appservice_kakaotalk_enabled | bool" tags: diff --git a/roles/custom/matrix-bridge-appservice-slack/tasks/init.yml b/roles/custom/matrix-bridge-appservice-slack/tasks/init.yml index 5d03b24b9..e07f1afc0 100644 --- a/roles/custom/matrix-bridge-appservice-slack/tasks/init.yml +++ b/roles/custom/matrix-bridge-appservice-slack/tasks/init.yml @@ -1,47 +1,4 @@ --- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the matrix-appservice-slack image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_appservice_slack_container_image_self_build and matrix_appservice_slack_enabled" - -# If the matrix-synapse role is not used, `matrix_synapse_role_executed` won't exist. -# We don't want to fail in such cases. -- name: Fail if matrix-synapse role already executed - ansible.builtin.fail: - msg: >- - The matrix-bridge-appservice-slack role needs to execute before the matrix-synapse role. - when: "matrix_synapse_role_executed | default(False)" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-appservice-slack.service'] }}" - when: matrix_appservice_slack_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_appservice_slack_config_path }}/slack-registration.yaml,dst=/matrix-appservice-slack-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-appservice-slack-registration.yaml"] - }} - when: matrix_appservice_slack_enabled | bool - -# If the matrix-synapse role is not used, `matrix_synapse_role_executed` won't exist. -# We don't want to fail in such cases. -- name: Fail if matrix-synapse role already executed - ansible.builtin.fail: - msg: >- - The matrix-bridge-appservice-slack role needs to execute before the matrix-synapse role. - when: "matrix_synapse_role_executed | default(False)" - when: matrix_appservice_slack_enabled | bool tags: diff --git a/roles/custom/matrix-bridge-appservice-webhooks/tasks/init.yml b/roles/custom/matrix-bridge-appservice-webhooks/tasks/init.yml index 1f8ace9e8..47a298750 100644 --- a/roles/custom/matrix-bridge-appservice-webhooks/tasks/init.yml +++ b/roles/custom/matrix-bridge-appservice-webhooks/tasks/init.yml @@ -1,40 +1,4 @@ --- -# If the matrix-synapse role is not used, `matrix_synapse_role_executed` won't exist. -# We don't want to fail in such cases. -- name: Fail if matrix-synapse role already executed - ansible.builtin.fail: - msg: >- - The matrix-bridge-appservice-webhooks role needs to execute before the matrix-synapse role. - when: "matrix_synapse_role_executed | default(False)" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-appservice-webhooks.service'] }}" - when: matrix_appservice_webhooks_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_appservice_webhooks_config_path }}/webhooks-registration.yaml,dst=/matrix-appservice-webhooks-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-appservice-webhooks-registration.yaml"] - }} - when: matrix_appservice_webhooks_enabled | bool - -# If the matrix-synapse role is not used, `matrix_synapse_role_executed` won't exist. -# We don't want to fail in such cases. -- name: Fail if matrix-synapse role already executed - ansible.builtin.fail: - msg: >- - The matrix-bridge-appservice-webhooks role needs to execute before the matrix-synapse role. - when: "matrix_synapse_role_executed | default(False)" - when: matrix_appservice_webhooks_enabled | bool tags: diff --git a/roles/custom/matrix-bridge-beeper-linkedin/tasks/init.yml b/roles/custom/matrix-bridge-beeper-linkedin/tasks/init.yml deleted file mode 100644 index 1208f185b..000000000 --- a/roles/custom/matrix-bridge-beeper-linkedin/tasks/init.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-beeper-linkedin.service'] }}" - when: matrix_beeper_linkedin_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_beeper_linkedin_config_path }}/registration.yaml,dst=/matrix-beeper-linkedin-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-beeper-linkedin-registration.yaml"] - }} - when: matrix_beeper_linkedin_enabled | bool diff --git a/roles/custom/matrix-bridge-beeper-linkedin/tasks/main.yml b/roles/custom/matrix-bridge-beeper-linkedin/tasks/main.yml index 8f295d2ca..9ba728f13 100644 --- a/roles/custom/matrix-bridge-beeper-linkedin/tasks/main.yml +++ b/roles/custom/matrix-bridge-beeper-linkedin/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_beeper_linkedin_enabled | bool" tags: diff --git a/roles/custom/matrix-bridge-go-skype-bridge/tasks/init.yml b/roles/custom/matrix-bridge-go-skype-bridge/tasks/init.yml deleted file mode 100644 index 58808454f..000000000 --- a/roles/custom/matrix-bridge-go-skype-bridge/tasks/init.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-go-skype-bridge.service'] }}" - when: matrix_go_skype_bridge_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_go_skype_bridge_config_path }}/registration.yaml,dst=/matrix-go-skype-bridge-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-go-skype-bridge-registration.yaml"] - }} - when: matrix_go_skype_bridge_enabled | bool diff --git a/roles/custom/matrix-bridge-go-skype-bridge/tasks/main.yml b/roles/custom/matrix-bridge-go-skype-bridge/tasks/main.yml index 39f4b2e52..3b8fdb245 100644 --- a/roles/custom/matrix-bridge-go-skype-bridge/tasks/main.yml +++ b/roles/custom/matrix-bridge-go-skype-bridge/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_go_skype_bridge_enabled | bool" tags: diff --git a/roles/custom/matrix-bridge-heisenbridge/tasks/init.yml b/roles/custom/matrix-bridge-heisenbridge/tasks/init.yml deleted file mode 100644 index dd3d4c7d0..000000000 --- a/roles/custom/matrix-bridge-heisenbridge/tasks/init.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -# If the matrix-synapse role is not used, `matrix_synapse_role_executed` won't exist. -# We don't want to fail in such cases. -- name: Fail if matrix-synapse role already executed - ansible.builtin.fail: - msg: >- - The matrix-bridge-heisenbridge role needs to execute before the matrix-synapse role. - when: "matrix_heisenbridge_enabled and matrix_synapse_role_executed | default(False)" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-heisenbridge.service'] }}" - when: matrix_heisenbridge_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_heisenbridge_base_path }}/registration.yaml,dst=/heisenbridge-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/heisenbridge-registration.yaml"] - }} - when: matrix_heisenbridge_enabled | bool diff --git a/roles/custom/matrix-bridge-heisenbridge/tasks/main.yml b/roles/custom/matrix-bridge-heisenbridge/tasks/main.yml index 6af9813ec..70bc86c31 100644 --- a/roles/custom/matrix-bridge-heisenbridge/tasks/main.yml +++ b/roles/custom/matrix-bridge-heisenbridge/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_install.yml" when: "run_setup | bool and matrix_heisenbridge_enabled | bool" tags: diff --git a/roles/custom/matrix-bridge-hookshot/tasks/init.yml b/roles/custom/matrix-bridge-hookshot/tasks/init.yml index 63921f311..625e30234 100644 --- a/roles/custom/matrix-bridge-hookshot/tasks/init.yml +++ b/roles/custom/matrix-bridge-hookshot/tasks/init.yml @@ -1,32 +1,4 @@ --- -# If the matrix-synapse role is not used, `matrix_synapse_role_executed` won't exist. -# We don't want to fail in such cases. -- name: Fail if matrix-synapse role already executed - ansible.builtin.fail: - msg: >- - The matrix-bridge-hookshot role needs to execute before the matrix-synapse role. - when: "matrix_hookshot_enabled and matrix_synapse_role_executed | default(False)" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-hookshot.service'] }}" - when: matrix_hookshot_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_hookshot_base_path }}/registration.yml,dst=/hookshot-registration.yml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/hookshot-registration.yml"] - }} - when: matrix_hookshot_enabled | bool - when: matrix_hookshot_enabled | bool block: diff --git a/roles/custom/matrix-bridge-mautrix-discord/tasks/init.yml b/roles/custom/matrix-bridge-mautrix-discord/tasks/init.yml deleted file mode 100644 index 3f94a73ad..000000000 --- a/roles/custom/matrix-bridge-mautrix-discord/tasks/init.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-mautrix-discord.service'] }}" - when: matrix_mautrix_discord_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_mautrix_discord_config_path }}/registration.yaml,dst=/matrix-mautrix-discord-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-mautrix-discord-registration.yaml"] - }} - when: matrix_mautrix_discord_enabled | bool diff --git a/roles/custom/matrix-bridge-mautrix-discord/tasks/main.yml b/roles/custom/matrix-bridge-mautrix-discord/tasks/main.yml index 9eaadf684..2b68f1ed4 100644 --- a/roles/custom/matrix-bridge-mautrix-discord/tasks/main.yml +++ b/roles/custom/matrix-bridge-mautrix-discord/tasks/main.yml @@ -1,7 +1,4 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_mautrix_discord_enabled | bool" diff --git a/roles/custom/matrix-bridge-mautrix-facebook/tasks/init.yml b/roles/custom/matrix-bridge-mautrix-facebook/tasks/init.yml index 5565689f4..8a4229af7 100644 --- a/roles/custom/matrix-bridge-mautrix-facebook/tasks/init.yml +++ b/roles/custom/matrix-bridge-mautrix-facebook/tasks/init.yml @@ -1,31 +1,4 @@ --- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the Mautrix-Facebook image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_mautrix_facebook_container_image_self_build and matrix_mautrix_facebook_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-mautrix-facebook.service'] }}" - when: matrix_mautrix_facebook_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_mautrix_facebook_config_path }}/registration.yaml,dst=/matrix-mautrix-facebook-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-mautrix-facebook-registration.yaml"] - }} - when: matrix_mautrix_facebook_enabled | bool - when: matrix_mautrix_facebook_enabled | bool and matrix_mautrix_facebook_appservice_public_enabled | bool tags: diff --git a/roles/custom/matrix-bridge-mautrix-googlechat/tasks/init.yml b/roles/custom/matrix-bridge-mautrix-googlechat/tasks/init.yml index c4ae920c4..17e6094df 100644 --- a/roles/custom/matrix-bridge-mautrix-googlechat/tasks/init.yml +++ b/roles/custom/matrix-bridge-mautrix-googlechat/tasks/init.yml @@ -1,31 +1,4 @@ --- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the Mautrix-Google Chat image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_mautrix_googlechat_container_image_self_build and matrix_mautrix_googlechat_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-mautrix-googlechat.service'] }}" - when: matrix_mautrix_googlechat_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_mautrix_googlechat_config_path }}/registration.yaml,dst=/matrix-mautrix-googlechat-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-mautrix-googlechat-registration.yaml"] - }} - when: matrix_mautrix_googlechat_enabled | bool - when: matrix_mautrix_googlechat_enabled | bool tags: diff --git a/roles/custom/matrix-bridge-mautrix-hangouts/tasks/init.yml b/roles/custom/matrix-bridge-mautrix-hangouts/tasks/init.yml index 380dc4b38..8850f1cf5 100644 --- a/roles/custom/matrix-bridge-mautrix-hangouts/tasks/init.yml +++ b/roles/custom/matrix-bridge-mautrix-hangouts/tasks/init.yml @@ -1,31 +1,4 @@ --- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the Mautrix-Hangouts image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_mautrix_hangouts_container_image_self_build and matrix_mautrix_hangouts_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-mautrix-hangouts.service'] }}" - when: matrix_mautrix_hangouts_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_mautrix_hangouts_config_path }}/registration.yaml,dst=/matrix-mautrix-hangouts-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-mautrix-hangouts-registration.yaml"] - }} - when: matrix_mautrix_hangouts_enabled | bool - when: matrix_mautrix_hangouts_enabled | bool tags: diff --git a/roles/custom/matrix-bridge-mautrix-instagram/tasks/init.yml b/roles/custom/matrix-bridge-mautrix-instagram/tasks/init.yml deleted file mode 100644 index 7ef037e33..000000000 --- a/roles/custom/matrix-bridge-mautrix-instagram/tasks/init.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the Mautrix-Instagram image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_mautrix_instagram_container_image_self_build and matrix_mautrix_instagram_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-mautrix-instagram.service'] }}" - when: matrix_mautrix_instagram_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_mautrix_instagram_config_path }}/registration.yaml,dst=/matrix-mautrix-instagram-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-mautrix-instagram-registration.yaml"] - }} - when: matrix_mautrix_instagram_enabled | bool diff --git a/roles/custom/matrix-bridge-mautrix-instagram/tasks/main.yml b/roles/custom/matrix-bridge-mautrix-instagram/tasks/main.yml index d5becb6d3..403546ff4 100644 --- a/roles/custom/matrix-bridge-mautrix-instagram/tasks/main.yml +++ b/roles/custom/matrix-bridge-mautrix-instagram/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_mautrix_instagram_enabled | bool" tags: diff --git a/roles/custom/matrix-bridge-mautrix-signal/tasks/init.yml b/roles/custom/matrix-bridge-mautrix-signal/tasks/init.yml deleted file mode 100644 index 17ad98a4c..000000000 --- a/roles/custom/matrix-bridge-mautrix-signal/tasks/init.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-mautrix-signal.service', 'matrix-mautrix-signal-daemon.service'] }}" - when: matrix_mautrix_signal_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_mautrix_signal_config_path }}/registration.yaml,dst=/matrix-mautrix-signal-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-mautrix-signal-registration.yaml"] - }} - when: matrix_mautrix_signal_enabled | bool diff --git a/roles/custom/matrix-bridge-mautrix-signal/tasks/main.yml b/roles/custom/matrix-bridge-mautrix-signal/tasks/main.yml index 54bdafcda..6b69be288 100644 --- a/roles/custom/matrix-bridge-mautrix-signal/tasks/main.yml +++ b/roles/custom/matrix-bridge-mautrix-signal/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_mautrix_signal_enabled | bool" tags: diff --git a/roles/custom/matrix-bridge-mautrix-telegram/tasks/init.yml b/roles/custom/matrix-bridge-mautrix-telegram/tasks/init.yml index f828f7932..d292edc00 100644 --- a/roles/custom/matrix-bridge-mautrix-telegram/tasks/init.yml +++ b/roles/custom/matrix-bridge-mautrix-telegram/tasks/init.yml @@ -1,31 +1,4 @@ --- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the Mautrix-Telegram image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_mautrix_telegram_container_image_self_build and matrix_mautrix_telegram_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-mautrix-telegram.service'] }}" - when: matrix_mautrix_telegram_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_mautrix_telegram_config_path }}/registration.yaml,dst=/matrix-mautrix-telegram-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-mautrix-telegram-registration.yaml"] - }} - when: matrix_mautrix_telegram_enabled | bool - when: matrix_mautrix_telegram_enabled | bool and matrix_mautrix_telegram_appservice_public_enabled | bool tags: diff --git a/roles/custom/matrix-bridge-mautrix-twitter/tasks/init.yml b/roles/custom/matrix-bridge-mautrix-twitter/tasks/init.yml deleted file mode 100644 index 67f0a7dcf..000000000 --- a/roles/custom/matrix-bridge-mautrix-twitter/tasks/init.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-mautrix-twitter.service'] }}" - when: matrix_mautrix_twitter_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_mautrix_twitter_config_path }}/registration.yaml,dst=/matrix-mautrix-twitter-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-mautrix-twitter-registration.yaml"] - }} - when: matrix_mautrix_twitter_enabled | bool - -# ansible lower than 2.8, does not support docker_image build parameters -# for self buildig it is explicitly needed, so we rather fail here -- name: Fail if running on Ansible lower than 2.8 and trying self building - ansible.builtin.fail: - msg: "To self build Mautrix Twitter image, you should usa ansible 2.8 or higher. E.g. pip contains such packages." - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_mautrix_twitter_container_image_self_build" diff --git a/roles/custom/matrix-bridge-mautrix-twitter/tasks/main.yml b/roles/custom/matrix-bridge-mautrix-twitter/tasks/main.yml index 2f0c39b2a..08e840aa5 100644 --- a/roles/custom/matrix-bridge-mautrix-twitter/tasks/main.yml +++ b/roles/custom/matrix-bridge-mautrix-twitter/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_mautrix_twitter_enabled | bool" tags: diff --git a/roles/custom/matrix-bridge-mautrix-whatsapp/tasks/init.yml b/roles/custom/matrix-bridge-mautrix-whatsapp/tasks/init.yml deleted file mode 100644 index 7907c73d0..000000000 --- a/roles/custom/matrix-bridge-mautrix-whatsapp/tasks/init.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-mautrix-whatsapp.service'] }}" - when: matrix_mautrix_whatsapp_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_mautrix_whatsapp_config_path }}/registration.yaml,dst=/matrix-mautrix-whatsapp-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-mautrix-whatsapp-registration.yaml"] - }} - when: matrix_mautrix_whatsapp_enabled | bool diff --git a/roles/custom/matrix-bridge-mautrix-whatsapp/tasks/main.yml b/roles/custom/matrix-bridge-mautrix-whatsapp/tasks/main.yml index 4df6fd23b..c5b3b153b 100644 --- a/roles/custom/matrix-bridge-mautrix-whatsapp/tasks/main.yml +++ b/roles/custom/matrix-bridge-mautrix-whatsapp/tasks/main.yml @@ -1,7 +1,4 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_mautrix_whatsapp_enabled | bool" diff --git a/roles/custom/matrix-bridge-mx-puppet-discord/tasks/init.yml b/roles/custom/matrix-bridge-mx-puppet-discord/tasks/init.yml deleted file mode 100644 index 9e2a937fe..000000000 --- a/roles/custom/matrix-bridge-mx-puppet-discord/tasks/init.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the mx-puppet-discord image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_mx_puppet_discord_container_image_self_build and matrix_mx_puppet_discord_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-mx-puppet-discord.service'] }}" - when: matrix_mx_puppet_discord_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_mx_puppet_discord_config_path }}/registration.yaml,dst=/matrix-mx-puppet-discord-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-mx-puppet-discord-registration.yaml"] - }} - when: matrix_mx_puppet_discord_enabled | bool diff --git a/roles/custom/matrix-bridge-mx-puppet-discord/tasks/main.yml b/roles/custom/matrix-bridge-mx-puppet-discord/tasks/main.yml index 281092e1a..c65a04e3b 100644 --- a/roles/custom/matrix-bridge-mx-puppet-discord/tasks/main.yml +++ b/roles/custom/matrix-bridge-mx-puppet-discord/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_mx_puppet_discord_enabled | bool" tags: diff --git a/roles/custom/matrix-bridge-mx-puppet-groupme/tasks/init.yml b/roles/custom/matrix-bridge-mx-puppet-groupme/tasks/init.yml deleted file mode 100644 index 76d184dd1..000000000 --- a/roles/custom/matrix-bridge-mx-puppet-groupme/tasks/init.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the mx-puppet-groupme image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_mx_puppet_groupme_container_image_self_build and matrix_mx_puppet_groupme_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-mx-puppet-groupme.service'] }}" - when: matrix_mx_puppet_groupme_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_mx_puppet_groupme_config_path }}/registration.yaml,dst=/matrix-mx-puppet-groupme-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-mx-puppet-groupme-registration.yaml"] - }} - when: matrix_mx_puppet_groupme_enabled | bool diff --git a/roles/custom/matrix-bridge-mx-puppet-groupme/tasks/main.yml b/roles/custom/matrix-bridge-mx-puppet-groupme/tasks/main.yml index 8cc557592..f6707d4e3 100644 --- a/roles/custom/matrix-bridge-mx-puppet-groupme/tasks/main.yml +++ b/roles/custom/matrix-bridge-mx-puppet-groupme/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_mx_puppet_groupme_enabled | bool" tags: diff --git a/roles/custom/matrix-bridge-mx-puppet-instagram/tasks/init.yml b/roles/custom/matrix-bridge-mx-puppet-instagram/tasks/init.yml deleted file mode 100644 index 741c32c0f..000000000 --- a/roles/custom/matrix-bridge-mx-puppet-instagram/tasks/init.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the mx-puppet-instagram image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_mx_puppet_instagram_container_image_self_build and matrix_mx_puppet_instagram_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-mx-puppet-instagram.service'] }}" - when: matrix_mx_puppet_instagram_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_mx_puppet_instagram_config_path }}/registration.yaml,dst=/matrix-mx-puppet-instagram-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-mx-puppet-instagram-registration.yaml"] - }} - when: matrix_mx_puppet_instagram_enabled | bool diff --git a/roles/custom/matrix-bridge-mx-puppet-instagram/tasks/main.yml b/roles/custom/matrix-bridge-mx-puppet-instagram/tasks/main.yml index 978577cc3..220fb46fc 100644 --- a/roles/custom/matrix-bridge-mx-puppet-instagram/tasks/main.yml +++ b/roles/custom/matrix-bridge-mx-puppet-instagram/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_mx_puppet_instagram_enabled | bool" tags: diff --git a/roles/custom/matrix-bridge-mx-puppet-slack/tasks/init.yml b/roles/custom/matrix-bridge-mx-puppet-slack/tasks/init.yml index 9eff170ac..217c733dc 100644 --- a/roles/custom/matrix-bridge-mx-puppet-slack/tasks/init.yml +++ b/roles/custom/matrix-bridge-mx-puppet-slack/tasks/init.yml @@ -1,31 +1,4 @@ --- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the mx-puppet-slack image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_mx_puppet_slack_container_image_self_build and matrix_mx_puppet_slack_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-mx-puppet-slack.service'] }}" - when: matrix_mx_puppet_slack_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_mx_puppet_slack_config_path }}/registration.yaml,dst=/matrix-mx-puppet-slack-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-mx-puppet-slack-registration.yaml"] - }} - when: matrix_mx_puppet_slack_enabled | bool - when: matrix_mx_puppet_slack_enabled | bool tags: diff --git a/roles/custom/matrix-bridge-mx-puppet-steam/tasks/init.yml b/roles/custom/matrix-bridge-mx-puppet-steam/tasks/init.yml deleted file mode 100644 index 5f9a5a833..000000000 --- a/roles/custom/matrix-bridge-mx-puppet-steam/tasks/init.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the mx-puppet-steam image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_mx_puppet_steam_container_image_self_build and matrix_mx_puppet_steam_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-mx-puppet-steam.service'] }}" - when: matrix_mx_puppet_steam_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_mx_puppet_steam_config_path }}/registration.yaml,dst=/matrix-mx-puppet-steam-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-mx-puppet-steam-registration.yaml"] - }} - when: matrix_mx_puppet_steam_enabled | bool diff --git a/roles/custom/matrix-bridge-mx-puppet-steam/tasks/main.yml b/roles/custom/matrix-bridge-mx-puppet-steam/tasks/main.yml index 236a7009f..9feb22fb9 100644 --- a/roles/custom/matrix-bridge-mx-puppet-steam/tasks/main.yml +++ b/roles/custom/matrix-bridge-mx-puppet-steam/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_mx_puppet_steam_enabled | bool" tags: diff --git a/roles/custom/matrix-bridge-mx-puppet-twitter/tasks/init.yml b/roles/custom/matrix-bridge-mx-puppet-twitter/tasks/init.yml index a58cd9ac6..4a0ea6733 100644 --- a/roles/custom/matrix-bridge-mx-puppet-twitter/tasks/init.yml +++ b/roles/custom/matrix-bridge-mx-puppet-twitter/tasks/init.yml @@ -1,31 +1,4 @@ --- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the mx-puppet-twitter image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_mx_puppet_twitter_container_image_self_build and matrix_mx_puppet_twitter_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-mx-puppet-twitter.service'] }}" - when: matrix_mx_puppet_twitter_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_mx_puppet_twitter_config_path }}/registration.yaml,dst=/matrix-mx-puppet-twitter-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-mx-puppet-twitter-registration.yaml"] - }} - when: matrix_mx_puppet_twitter_enabled | bool - when: matrix_mx_puppet_twitter_enabled | bool tags: diff --git a/roles/custom/matrix-bridge-sms/tasks/init.yml b/roles/custom/matrix-bridge-sms/tasks/init.yml deleted file mode 100644 index 3c044c152..000000000 --- a/roles/custom/matrix-bridge-sms/tasks/init.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- - -# If the matrix-synapse role is not used, `matrix_synapse_role_executed` won't exist. -# We don't want to fail in such cases. -- name: Fail if matrix-synapse role already executed - ansible.builtin.fail: - msg: >- - The matrix-sms-bridge role needs to execute before the matrix-synapse role. - when: "matrix_sms_bridge_enabled and matrix_synapse_role_executed | default(False)" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-sms-bridge.service'] }}" - when: matrix_sms_bridge_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_sms_bridge_config_path }}/registration.yaml,dst=/matrix-sms-bridge-registration.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-sms-bridge-registration.yaml"] - }} - when: matrix_sms_bridge_enabled | bool diff --git a/roles/custom/matrix-bridge-sms/tasks/main.yml b/roles/custom/matrix-bridge-sms/tasks/main.yml index 1a6b964ba..4d4895c46 100644 --- a/roles/custom/matrix-bridge-sms/tasks/main.yml +++ b/roles/custom/matrix-bridge-sms/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_sms_bridge_enabled | bool" tags: diff --git a/roles/custom/matrix-cactus-comments/tasks/init.yml b/roles/custom/matrix-cactus-comments/tasks/init.yml index 5067d0254..5e0941074 100644 --- a/roles/custom/matrix-cactus-comments/tasks/init.yml +++ b/roles/custom/matrix-cactus-comments/tasks/init.yml @@ -1,26 +1,5 @@ --- -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-cactus-comments.service'] }}" - when: matrix_cactus_comments_enabled | bool - -# If the matrix-synapse role is not used, these variables may not exist. -- ansible.builtin.set_fact: - matrix_homeserver_container_runtime_injected_arguments: > - {{ - matrix_homeserver_container_runtime_injected_arguments | default([]) - + - ["--mount type=bind,src={{ matrix_cactus_comments_app_service_config_file }},dst=/matrix-cactus-comments.yaml,ro"] - }} - - matrix_homeserver_app_service_runtime_injected_config_files: > - {{ - matrix_homeserver_app_service_runtime_injected_config_files | default([]) - + - ["/matrix-cactus-comments.yaml"] - }} - when: matrix_cactus_comments_enabled | bool - - when: matrix_cactus_comments_enabled | bool and matrix_cactus_comments_serve_client_enabled | bool tags: - always diff --git a/roles/custom/matrix-client-cinny/tasks/init.yml b/roles/custom/matrix-client-cinny/tasks/init.yml deleted file mode 100644 index 00e46dc82..000000000 --- a/roles/custom/matrix-client-cinny/tasks/init.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the Cinny image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_client_cinny_container_image_self_build and matrix_client_cinny_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-client-cinny.service'] }}" - when: matrix_client_cinny_enabled | bool diff --git a/roles/custom/matrix-client-cinny/tasks/main.yml b/roles/custom/matrix-client-cinny/tasks/main.yml index 9eb007810..e0f1579cb 100644 --- a/roles/custom/matrix-client-cinny/tasks/main.yml +++ b/roles/custom/matrix-client-cinny/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_client_cinny_enabled | bool" tags: diff --git a/roles/custom/matrix-client-element/tasks/init.yml b/roles/custom/matrix-client-element/tasks/init.yml deleted file mode 100644 index 7bdad9e1a..000000000 --- a/roles/custom/matrix-client-element/tasks/init.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-client-element.service'] }}" - when: matrix_client_element_enabled | bool - -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the Element image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_client_element_container_image_self_build and matrix_client_element_enabled" diff --git a/roles/custom/matrix-client-element/tasks/main.yml b/roles/custom/matrix-client-element/tasks/main.yml index 53a25afb9..7dbe9ce82 100644 --- a/roles/custom/matrix-client-element/tasks/main.yml +++ b/roles/custom/matrix-client-element/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_client_element_enabled | bool" tags: diff --git a/roles/custom/matrix-client-hydrogen/tasks/init.yml b/roles/custom/matrix-client-hydrogen/tasks/init.yml deleted file mode 100644 index 561018e1a..000000000 --- a/roles/custom/matrix-client-hydrogen/tasks/init.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the Hydrogen image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_client_hydrogen_container_image_self_build and matrix_client_hydrogen_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-client-hydrogen.service'] }}" - when: matrix_client_hydrogen_enabled | bool diff --git a/roles/custom/matrix-client-hydrogen/tasks/main.yml b/roles/custom/matrix-client-hydrogen/tasks/main.yml index 89133364e..3f5023937 100644 --- a/roles/custom/matrix-client-hydrogen/tasks/main.yml +++ b/roles/custom/matrix-client-hydrogen/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_client_hydrogen_enabled | bool" tags: diff --git a/roles/custom/matrix-conduit/tasks/init.yml b/roles/custom/matrix-conduit/tasks/init.yml deleted file mode 100644 index 5f464e404..000000000 --- a/roles/custom/matrix-conduit/tasks/init.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-conduit.service'] }}" - when: matrix_conduit_enabled | bool diff --git a/roles/custom/matrix-conduit/tasks/main.yml b/roles/custom/matrix-conduit/tasks/main.yml index 623d04582..94e50103c 100644 --- a/roles/custom/matrix-conduit/tasks/main.yml +++ b/roles/custom/matrix-conduit/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/conduit/setup.yml" when: run_setup | bool tags: diff --git a/roles/custom/matrix-corporal/tasks/init.yml b/roles/custom/matrix-corporal/tasks/init.yml deleted file mode 100644 index dffdbe908..000000000 --- a/roles/custom/matrix-corporal/tasks/init.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the Matrix Corporal image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_corporal_container_image_self_build and matrix_corporal_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-corporal.service'] }}" - when: matrix_corporal_enabled | bool diff --git a/roles/custom/matrix-corporal/tasks/main.yml b/roles/custom/matrix-corporal/tasks/main.yml index 1699262b1..1021518c7 100644 --- a/roles/custom/matrix-corporal/tasks/main.yml +++ b/roles/custom/matrix-corporal/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_corporal_enabled | bool" tags: diff --git a/roles/custom/matrix-coturn/tasks/init.yml b/roles/custom/matrix-coturn/tasks/init.yml deleted file mode 100644 index 315dfb656..000000000 --- a/roles/custom/matrix-coturn/tasks/init.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the coturn image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_coturn_container_image_self_build and matrix_coturn_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-coturn.service'] }}" - when: matrix_coturn_enabled | bool - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-coturn-reload.timer'] }}" - when: "matrix_coturn_enabled | bool and matrix_coturn_tls_enabled | bool" diff --git a/roles/custom/matrix-coturn/tasks/main.yml b/roles/custom/matrix-coturn/tasks/main.yml index 78f712f01..f2fc66d53 100644 --- a/roles/custom/matrix-coturn/tasks/main.yml +++ b/roles/custom/matrix-coturn/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_coturn_enabled | bool" tags: diff --git a/roles/custom/matrix-dendrite/defaults/main.yml b/roles/custom/matrix-dendrite/defaults/main.yml index f83085341..a60c33d26 100644 --- a/roles/custom/matrix-dendrite/defaults/main.yml +++ b/roles/custom/matrix-dendrite/defaults/main.yml @@ -46,15 +46,15 @@ matrix_dendrite_container_https_host_bind_address: "" # Also see `matrix_dendrite_container_arguments` matrix_dendrite_container_extra_arguments: [] -# matrix_dendrite_container_runtime_injected_arguments is a list of extra arguments to pass to the container. -# This list is built during runtime. You're not meant to override this variable. +# matrix_dendrite_container_extra_arguments_auto is a list of extra arguments to pass to the container. +# This list is managed by the playbook. You're not meant to override this variable. # If you'd like to inject your own arguments, see `matrix_dendrite_container_extra_arguments`. -matrix_dendrite_container_runtime_injected_arguments: [] +matrix_dendrite_container_extra_arguments_auto: [] # matrix_dendrite_container_arguments holds the final list of extra arguments to pass to the container. # You're not meant to override this variable. # If you'd like to inject your own arguments, see `matrix_dendrite_container_extra_arguments`. -matrix_dendrite_container_arguments: "{{ matrix_dendrite_container_extra_arguments + matrix_dendrite_container_runtime_injected_arguments }}" +matrix_dendrite_container_arguments: "{{ matrix_dendrite_container_extra_arguments + matrix_dendrite_container_extra_arguments_auto }}" # A list of extra arguments to pass to the container process (`dendrite-monolith` command) # Example: @@ -118,15 +118,15 @@ matrix_dendrite_container_additional_volumes: [] # Also see `matrix_dendrite_app_service_config_files_final` matrix_dendrite_app_service_config_files: [] -# matrix_dendrite_app_service_runtime_injected_config_files is a list of appservice config files. -# This list is built during runtime. You're not meant to override this variable. +# matrix_dendrite_app_service_config_files_auto is a list of appservice config files. +# This list is managed by the playbook. You're not meant to override this variable. # If you'd like to inject your own arguments, see `matrix_dendrite_app_service_config_files`. -matrix_dendrite_app_service_runtime_injected_config_files: [] +matrix_dendrite_app_service_config_files_auto: [] # matrix_dendrite_app_service_config_files_final holds the final list of config files to pass to the container. # You're not meant to override this variable. # If you'd like to inject your own arguments, see `matrix_dendrite_app_service_config_files`. -matrix_dendrite_app_service_config_files_final: "{{ matrix_dendrite_app_service_config_files + matrix_dendrite_app_service_runtime_injected_config_files }}" +matrix_dendrite_app_service_config_files_final: "{{ matrix_dendrite_app_service_config_files + matrix_dendrite_app_service_config_files_auto }}" # Enable exposure of metrics matrix_dendrite_metrics_enabled: false diff --git a/roles/custom/matrix-dendrite/tasks/init.yml b/roles/custom/matrix-dendrite/tasks/init.yml deleted file mode 100644 index 4ce641e9d..000000000 --- a/roles/custom/matrix-dendrite/tasks/init.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-dendrite.service'] }}" - when: matrix_dendrite_enabled | bool diff --git a/roles/custom/matrix-dendrite/tasks/main.yml b/roles/custom/matrix-dendrite/tasks/main.yml index d14beb154..639ad6e28 100644 --- a/roles/custom/matrix-dendrite/tasks/main.yml +++ b/roles/custom/matrix-dendrite/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: run_setup | bool tags: diff --git a/roles/custom/matrix-dimension/tasks/init.yml b/roles/custom/matrix-dimension/tasks/init.yml deleted file mode 100644 index c60a2fe2e..000000000 --- a/roles/custom/matrix-dimension/tasks/init.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-dimension.service'] }}" - when: matrix_dimension_enabled | bool diff --git a/roles/custom/matrix-dimension/tasks/main.yml b/roles/custom/matrix-dimension/tasks/main.yml index 6eef50d65..38f780e93 100644 --- a/roles/custom/matrix-dimension/tasks/main.yml +++ b/roles/custom/matrix-dimension/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: run_setup | bool tags: diff --git a/roles/custom/matrix-dynamic-dns/tasks/init.yml b/roles/custom/matrix-dynamic-dns/tasks/init.yml deleted file mode 100644 index 9c906441f..000000000 --- a/roles/custom/matrix-dynamic-dns/tasks/init.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the Dynamic DNS image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_dynamic_dns_container_image_self_build and matrix_dynamic_dns_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-dynamic-dns.service'] }}" - when: "matrix_dynamic_dns_enabled | bool" diff --git a/roles/custom/matrix-dynamic-dns/tasks/main.yml b/roles/custom/matrix-dynamic-dns/tasks/main.yml index 2f33af86e..bec7785c9 100644 --- a/roles/custom/matrix-dynamic-dns/tasks/main.yml +++ b/roles/custom/matrix-dynamic-dns/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_dynamic_dns_enabled | bool" tags: diff --git a/roles/custom/matrix-email2matrix/tasks/init.yml b/roles/custom/matrix-email2matrix/tasks/init.yml deleted file mode 100644 index 02dbc9ee3..000000000 --- a/roles/custom/matrix-email2matrix/tasks/init.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-email2matrix.service'] }}" - when: matrix_email2matrix_enabled | bool diff --git a/roles/custom/matrix-email2matrix/tasks/main.yml b/roles/custom/matrix-email2matrix/tasks/main.yml index 3adbc6466..4339b4db3 100644 --- a/roles/custom/matrix-email2matrix/tasks/main.yml +++ b/roles/custom/matrix-email2matrix/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_email2matrix_enabled | bool" tags: diff --git a/roles/custom/matrix-etherpad/tasks/init.yml b/roles/custom/matrix-etherpad/tasks/init.yml index d35ed375e..159dbe879 100644 --- a/roles/custom/matrix-etherpad/tasks/init.yml +++ b/roles/custom/matrix-etherpad/tasks/init.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-etherpad.service'] }}" - when: matrix_etherpad_enabled | bool - - when: matrix_etherpad_enabled | bool and matrix_etherpad_mode == 'dimension' tags: - always diff --git a/roles/custom/matrix-grafana/tasks/init.yml b/roles/custom/matrix-grafana/tasks/init.yml deleted file mode 100644 index 7b363ee77..000000000 --- a/roles/custom/matrix-grafana/tasks/init.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-grafana.service'] }}" - when: matrix_grafana_enabled | bool diff --git a/roles/custom/matrix-grafana/tasks/main.yml b/roles/custom/matrix-grafana/tasks/main.yml index 34a3f415b..573f792f6 100644 --- a/roles/custom/matrix-grafana/tasks/main.yml +++ b/roles/custom/matrix-grafana/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_grafana_enabled | bool" tags: diff --git a/roles/custom/matrix-jitsi/tasks/init.yml b/roles/custom/matrix-jitsi/tasks/init.yml deleted file mode 100644 index 8606c4b3e..000000000 --- a/roles/custom/matrix-jitsi/tasks/init.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-jitsi-web.service', 'matrix-jitsi-prosody.service', 'matrix-jitsi-jicofo.service', 'matrix-jitsi-jvb.service'] }}" - when: matrix_jitsi_enabled | bool - -- name: Fail if on an unsupported architecture - ansible.builtin.fail: - msg: "Jitsi only supports the amd64 architecture right now. See https://github.com/jitsi/docker-jitsi-meet/issues/1069 and https://github.com/jitsi/docker-jitsi-meet/issues/1214" - when: matrix_jitsi_enabled | bool and matrix_architecture not in ['amd64', 'arm64'] diff --git a/roles/custom/matrix-jitsi/tasks/main.yml b/roles/custom/matrix-jitsi/tasks/main.yml index be96d944d..9aac5eae8 100644 --- a/roles/custom/matrix-jitsi/tasks/main.yml +++ b/roles/custom/matrix-jitsi/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/init_additional_jvb.yml" tags: - setup-additional-jitsi-jvb diff --git a/roles/custom/matrix-jitsi/tasks/validate_config.yml b/roles/custom/matrix-jitsi/tasks/validate_config.yml index df87b7589..258b4864c 100644 --- a/roles/custom/matrix-jitsi/tasks/validate_config.yml +++ b/roles/custom/matrix-jitsi/tasks/validate_config.yml @@ -1,5 +1,10 @@ --- +- name: Fail if on an unsupported architecture + ansible.builtin.fail: + msg: "Jitsi only supports the amd64 architecture right now. See https://github.com/jitsi/docker-jitsi-meet/issues/1069 and https://github.com/jitsi/docker-jitsi-meet/issues/1214" + when: matrix_jitsi_enabled | bool and matrix_architecture not in ['amd64', 'arm64'] + - name: Fail if required Jitsi settings not defined ansible.builtin.fail: msg: >- diff --git a/roles/custom/matrix-ldap-registration-proxy/tasks/init.yml b/roles/custom/matrix-ldap-registration-proxy/tasks/init.yml index 406236095..f035e6579 100644 --- a/roles/custom/matrix-ldap-registration-proxy/tasks/init.yml +++ b/roles/custom/matrix-ldap-registration-proxy/tasks/init.yml @@ -1,14 +1,4 @@ --- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the matrix_ldap_registration_proxy image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_ldap_registration_proxy_container_image_self_build and matrix_ldap_registration_proxy_enabled | bool" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-ldap-registration-proxy.service'] }}" - when: matrix_ldap_registration_proxy_enabled | bool - when: matrix_ldap_registration_proxy_enabled | bool tags: diff --git a/roles/custom/matrix-ma1sd/tasks/init.yml b/roles/custom/matrix-ma1sd/tasks/init.yml deleted file mode 100644 index 48226aa07..000000000 --- a/roles/custom/matrix-ma1sd/tasks/init.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the ma1sd image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_ma1sd_container_image_self_build and matrix_ma1sd_enabled | bool" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-ma1sd.service'] }}" - when: matrix_ma1sd_enabled | bool diff --git a/roles/custom/matrix-ma1sd/tasks/main.yml b/roles/custom/matrix-ma1sd/tasks/main.yml index f55e7891c..add76bb2d 100644 --- a/roles/custom/matrix-ma1sd/tasks/main.yml +++ b/roles/custom/matrix-ma1sd/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_ma1sd_enabled | bool" tags: diff --git a/roles/custom/matrix-mailer/tasks/init.yml b/roles/custom/matrix-mailer/tasks/init.yml deleted file mode 100644 index 487ed0c9c..000000000 --- a/roles/custom/matrix-mailer/tasks/init.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the Matrix Mailer image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_mailer_container_image_self_build and matrix_mailer_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-mailer.service'] }}" - when: matrix_mailer_enabled | bool diff --git a/roles/custom/matrix-mailer/tasks/main.yml b/roles/custom/matrix-mailer/tasks/main.yml index e49ff26d6..cf9123bf3 100644 --- a/roles/custom/matrix-mailer/tasks/main.yml +++ b/roles/custom/matrix-mailer/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_mailer.yml" when: run_setup | bool tags: diff --git a/roles/custom/matrix-nginx-proxy/tasks/init.yml b/roles/custom/matrix-nginx-proxy/tasks/init.yml deleted file mode 100644 index eb4249cb8..000000000 --- a/roles/custom/matrix-nginx-proxy/tasks/init.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-nginx-proxy.service'] }}" - when: matrix_nginx_proxy_enabled | bool - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + [item.name] }}" - when: "item.applicable | bool and item.enableable | bool" - with_items: "{{ matrix_ssl_renewal_systemd_units_list }}" diff --git a/roles/custom/matrix-nginx-proxy/tasks/main.yml b/roles/custom/matrix-nginx-proxy/tasks/main.yml index 9c34d1f56..168608daa 100644 --- a/roles/custom/matrix-nginx-proxy/tasks/main.yml +++ b/roles/custom/matrix-nginx-proxy/tasks/main.yml @@ -1,7 +1,4 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always # Always validating the configuration, even if `matrix_nginx_proxy: false`. # This role performs actions even if the role is disabled, so we need diff --git a/roles/custom/matrix-ntfy/tasks/init.yml b/roles/custom/matrix-ntfy/tasks/init.yml deleted file mode 100644 index 6222ada0c..000000000 --- a/roles/custom/matrix-ntfy/tasks/init.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-ntfy.service'] }}" - when: matrix_ntfy_enabled | bool diff --git a/roles/custom/matrix-ntfy/tasks/main.yml b/roles/custom/matrix-ntfy/tasks/main.yml index 200d38c4a..8a4acd7ce 100644 --- a/roles/custom/matrix-ntfy/tasks/main.yml +++ b/roles/custom/matrix-ntfy/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_install.yml" when: "run_setup | bool and matrix_ntfy_enabled | bool" tags: diff --git a/roles/custom/matrix-postgres-backup/tasks/init.yml b/roles/custom/matrix-postgres-backup/tasks/init.yml deleted file mode 100644 index 5ece870a4..000000000 --- a/roles/custom/matrix-postgres-backup/tasks/init.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-postgres-backup.service'] }}" - when: matrix_postgres_backup_enabled | bool diff --git a/roles/custom/matrix-postgres-backup/tasks/main.yml b/roles/custom/matrix-postgres-backup/tasks/main.yml index 1403fa5b2..4fef6f459 100644 --- a/roles/custom/matrix-postgres-backup/tasks/main.yml +++ b/roles/custom/matrix-postgres-backup/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_postgres_backup_enabled | bool" tags: diff --git a/roles/custom/matrix-postgres/tasks/init.yml b/roles/custom/matrix-postgres/tasks/init.yml deleted file mode 100644 index 659380f10..000000000 --- a/roles/custom/matrix-postgres/tasks/init.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-postgres.service'] }}" - when: matrix_postgres_enabled | bool diff --git a/roles/custom/matrix-postgres/tasks/main.yml b/roles/custom/matrix-postgres/tasks/main.yml index 8e21b3c63..c282b3827 100644 --- a/roles/custom/matrix-postgres/tasks/main.yml +++ b/roles/custom/matrix-postgres/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_postgres_enabled | bool" tags: diff --git a/roles/custom/matrix-prometheus-node-exporter/tasks/init.yml b/roles/custom/matrix-prometheus-node-exporter/tasks/init.yml index 460ab1373..eda1b755d 100644 --- a/roles/custom/matrix-prometheus-node-exporter/tasks/init.yml +++ b/roles/custom/matrix-prometheus-node-exporter/tasks/init.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-prometheus-node-exporter.service'] }}" - when: matrix_prometheus_node_exporter_enabled | bool - - when: matrix_prometheus_node_exporter_enabled | bool and matrix_prometheus_node_exporter_metrics_proxying_enabled | bool block: - name: Fail if matrix-nginx-proxy role already executed diff --git a/roles/custom/matrix-prometheus-postgres-exporter/tasks/init.yml b/roles/custom/matrix-prometheus-postgres-exporter/tasks/init.yml index 20333dce6..d409e2dd1 100644 --- a/roles/custom/matrix-prometheus-postgres-exporter/tasks/init.yml +++ b/roles/custom/matrix-prometheus-postgres-exporter/tasks/init.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-prometheus-postgres-exporter.service'] }}" - when: matrix_prometheus_postgres_exporter_enabled | bool - - when: matrix_prometheus_node_exporter_enabled | bool and matrix_prometheus_node_exporter_metrics_proxying_enabled | bool block: - name: Fail if matrix-nginx-proxy role already executed diff --git a/roles/custom/matrix-prometheus/tasks/init.yml b/roles/custom/matrix-prometheus/tasks/init.yml deleted file mode 100644 index 298536730..000000000 --- a/roles/custom/matrix-prometheus/tasks/init.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-prometheus.service'] }}" - when: matrix_prometheus_enabled | bool diff --git a/roles/custom/matrix-prometheus/tasks/main.yml b/roles/custom/matrix-prometheus/tasks/main.yml index 1a5a37089..61cd86dbc 100644 --- a/roles/custom/matrix-prometheus/tasks/main.yml +++ b/roles/custom/matrix-prometheus/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: "run_setup | bool and matrix_prometheus_enabled | bool" tags: diff --git a/roles/custom/matrix-redis/tasks/init.yml b/roles/custom/matrix-redis/tasks/init.yml deleted file mode 100644 index 00154b336..000000000 --- a/roles/custom/matrix-redis/tasks/init.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-redis'] }}" - when: matrix_redis_enabled | bool diff --git a/roles/custom/matrix-redis/tasks/main.yml b/roles/custom/matrix-redis/tasks/main.yml index 1bcac7d6a..51b3e12cc 100644 --- a/roles/custom/matrix-redis/tasks/main.yml +++ b/roles/custom/matrix-redis/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_redis.yml" when: run_setup | bool tags: diff --git a/roles/custom/matrix-registration/tasks/init.yml b/roles/custom/matrix-registration/tasks/init.yml index 2b43dffdf..a295cdfbe 100644 --- a/roles/custom/matrix-registration/tasks/init.yml +++ b/roles/custom/matrix-registration/tasks/init.yml @@ -1,14 +1,4 @@ --- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the Matrix Registration image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_registration_container_image_self_build and matrix_registration_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-registration.service'] }}" - when: matrix_registration_enabled | bool - when: matrix_registration_enabled | bool tags: diff --git a/roles/custom/matrix-sygnal/tasks/init.yml b/roles/custom/matrix-sygnal/tasks/init.yml deleted file mode 100644 index dae7a299c..000000000 --- a/roles/custom/matrix-sygnal/tasks/init.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-sygnal.service'] }}" - when: matrix_sygnal_enabled | bool diff --git a/roles/custom/matrix-sygnal/tasks/main.yml b/roles/custom/matrix-sygnal/tasks/main.yml index b001bb825..fb25feed8 100644 --- a/roles/custom/matrix-sygnal/tasks/main.yml +++ b/roles/custom/matrix-sygnal/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml" when: run_setup | bool tags: diff --git a/roles/custom/matrix-synapse-admin/tasks/init.yml b/roles/custom/matrix-synapse-admin/tasks/init.yml index c2b2d05f2..78ebbdecb 100644 --- a/roles/custom/matrix-synapse-admin/tasks/init.yml +++ b/roles/custom/matrix-synapse-admin/tasks/init.yml @@ -1,14 +1,4 @@ --- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the Synapse Admin image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_synapse_admin_container_image_self_build and matrix_synapse_admin_enabled" - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-synapse-admin.service'] }}" - when: matrix_synapse_admin_enabled | bool - when: matrix_synapse_admin_enabled | bool tags: diff --git a/roles/custom/matrix-synapse-reverse-proxy-companion/tasks/init.yml b/roles/custom/matrix-synapse-reverse-proxy-companion/tasks/init.yml deleted file mode 100644 index b10eca53c..000000000 --- a/roles/custom/matrix-synapse-reverse-proxy-companion/tasks/init.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-synapse-reverse-proxy-companion.service'] }}" - when: matrix_synapse_reverse_proxy_companion_enabled | bool diff --git a/roles/custom/matrix-synapse-reverse-proxy-companion/tasks/main.yml b/roles/custom/matrix-synapse-reverse-proxy-companion/tasks/main.yml index f8b6660be..65b2c0195 100644 --- a/roles/custom/matrix-synapse-reverse-proxy-companion/tasks/main.yml +++ b/roles/custom/matrix-synapse-reverse-proxy-companion/tasks/main.yml @@ -1,9 +1,5 @@ --- -- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml" - tags: - - always - - ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_install.yml" when: run_setup | bool and matrix_synapse_reverse_proxy_companion_enabled | bool tags: diff --git a/roles/custom/matrix-synapse-reverse-proxy-companion/tasks/setup_install.yml b/roles/custom/matrix-synapse-reverse-proxy-companion/tasks/setup_install.yml index ca263b6d4..83c1e5e3c 100644 --- a/roles/custom/matrix-synapse-reverse-proxy-companion/tasks/setup_install.yml +++ b/roles/custom/matrix-synapse-reverse-proxy-companion/tasks/setup_install.yml @@ -1,6 +1,6 @@ --- -- name: Ensure mtrix-synapse-reverse-proxy-companion paths exist +- name: Ensure matrix-synapse-reverse-proxy-companion paths exist ansible.builtin.file: path: "{{ item }}" state: directory diff --git a/roles/custom/matrix-synapse/defaults/main.yml b/roles/custom/matrix-synapse/defaults/main.yml index c6bf31fd2..f52f414b0 100644 --- a/roles/custom/matrix-synapse/defaults/main.yml +++ b/roles/custom/matrix-synapse/defaults/main.yml @@ -101,15 +101,15 @@ matrix_synapse_container_manhole_api_host_bind_port: '' # Also see `matrix_synapse_container_arguments` matrix_synapse_container_extra_arguments: [] -# matrix_synapse_container_runtime_injected_arguments is a list of extra arguments to pass to the container. -# This list is built during runtime. You're not meant to override this variable. +# matrix_synapse_container_extra_arguments_auto is a list of extra arguments to pass to the container. +# This list is managed by the playbook. You're not meant to override this variable. # If you'd like to inject your own arguments, see `matrix_synapse_container_extra_arguments`. -matrix_synapse_container_runtime_injected_arguments: [] +matrix_synapse_container_extra_arguments_auto: [] # matrix_synapse_container_arguments holds the final list of extra arguments to pass to the container. # You're not meant to override this variable. # If you'd like to inject your own arguments, see `matrix_synapse_container_extra_arguments`. -matrix_synapse_container_arguments: "{{ matrix_synapse_container_extra_arguments + matrix_synapse_container_runtime_injected_arguments }}" +matrix_synapse_container_arguments: "{{ matrix_synapse_container_extra_arguments + matrix_synapse_container_extra_arguments_auto }}" # List of systemd services that matrix-synapse.service depends on matrix_synapse_systemd_required_services_list: ['docker.service'] @@ -371,15 +371,15 @@ matrix_synapse_additional_loggers: [] # Also see `matrix_synapse_app_service_config_files_final` matrix_synapse_app_service_config_files: [] -# matrix_synapse_app_service_runtime_injected_config_files is a list of appservice config files. -# This list is built during runtime. You're not meant to override this variable. +# matrix_synapse_app_service_config_files_auto is a list of appservice config files. +# This list is managed by the playbook. You're not meant to override this variable. # If you'd like to inject your own arguments, see `matrix_synapse_app_service_config_files`. -matrix_synapse_app_service_runtime_injected_config_files: [] +matrix_synapse_app_service_config_files_auto: [] # matrix_synapse_app_service_config_files_final holds the final list of config files to pass to the container. # You're not meant to override this variable. # If you'd like to inject your own arguments, see `matrix_synapse_app_service_config_files`. -matrix_synapse_app_service_config_files_final: "{{ matrix_synapse_app_service_config_files + matrix_synapse_app_service_runtime_injected_config_files }}" +matrix_synapse_app_service_config_files_final: "{{ matrix_synapse_app_service_config_files + matrix_synapse_app_service_config_files_auto }}" # This is set dynamically during execution depending on whether # any password providers have been enabled or not. diff --git a/roles/custom/matrix-synapse/tasks/ext/s3-storage-provider/init.yml b/roles/custom/matrix-synapse/tasks/ext/s3-storage-provider/init.yml deleted file mode 100644 index 008161cb1..000000000 --- a/roles/custom/matrix-synapse/tasks/ext/s3-storage-provider/init.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-synapse-s3-storage-provider-migrate.timer'] }}" - when: matrix_synapse_ext_synapse_s3_storage_provider_enabled | bool diff --git a/roles/custom/matrix-synapse/tasks/init.yml b/roles/custom/matrix-synapse/tasks/init.yml index 9146936a0..635ef8f2c 100644 --- a/roles/custom/matrix-synapse/tasks/init.yml +++ b/roles/custom/matrix-synapse/tasks/init.yml @@ -1,20 +1,10 @@ --- -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - ansible.builtin.fail: - msg: "To self-build the Synapse image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_synapse_container_image_self_build and matrix_synapse_enabled" # Unless `matrix_synapse_workers_enabled_list` is explicitly defined, # we'll generate it dynamically. - ansible.builtin.include_tasks: "{{ role_path }}/tasks/synapse/workers/init.yml" when: "matrix_synapse_enabled and matrix_synapse_workers_enabled and matrix_synapse_workers_enabled_list | length == 0" -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-synapse.service'] }}" - when: matrix_synapse_enabled | bool - - name: Ensure workers are injected into various places ansible.builtin.include_tasks: "{{ role_path }}/tasks/synapse/workers/util/inject_worker.yml" with_items: "{{ matrix_synapse_workers_enabled_list }}" @@ -22,13 +12,6 @@ loop_var: matrix_synapse_worker_details when: matrix_synapse_enabled | bool and matrix_synapse_workers_enabled | bool -- ansible.builtin.set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-goofys.service'] }}" - when: matrix_s3_media_store_enabled | bool - -- ansible.builtin.include_tasks: "{{ role_path }}/tasks/ext/s3-storage-provider/init.yml" - when: matrix_synapse_ext_synapse_s3_storage_provider_enabled | bool - - when: matrix_synapse_enabled | bool and matrix_synapse_metrics_proxying_enabled | bool block: - name: Fail if matrix-nginx-proxy role already executed