From 42247411308bd301b1c093ed132be0512368b885 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Wed, 5 Jun 2024 21:22:21 +0300 Subject: [PATCH] Remove a few remaining hardcoded docker.service references Continuation of 9f2eff2ac799b9144cc2b1809760e1681a8a5b9f Provoked by 7749048bf807d5fd08e7b00e067d70b06e0526b1 (https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3353) --- .../matrix-bridge-appservice-kakaotalk/defaults/main.yml | 7 ++++++- .../custom/matrix-bridge-mautrix-wsproxy/defaults/main.yml | 7 ++++++- roles/custom/matrix-conduit/defaults/main.yml | 2 +- roles/custom/matrix-dendrite/defaults/main.yml | 4 ++-- roles/custom/matrix-media-repo/defaults/main.yml | 2 +- roles/custom/matrix-rageshake/defaults/main.yml | 2 +- roles/custom/matrix-sliding-sync/defaults/main.yml | 2 +- roles/custom/matrix-synapse/defaults/main.yml | 6 ++++++ .../templates/goofys/systemd/matrix-goofys.service.j2 | 5 +++-- 9 files changed, 27 insertions(+), 10 deletions(-) diff --git a/roles/custom/matrix-bridge-appservice-kakaotalk/defaults/main.yml b/roles/custom/matrix-bridge-appservice-kakaotalk/defaults/main.yml index 448211d36..09d6daa2b 100644 --- a/roles/custom/matrix-bridge-appservice-kakaotalk/defaults/main.yml +++ b/roles/custom/matrix-bridge-appservice-kakaotalk/defaults/main.yml @@ -55,7 +55,12 @@ matrix_appservice_kakaotalk_container_extra_arguments: [] # List of systemd services that matrix-appservice-kakaotalk.service depends on. matrix_appservice_kakaotalk_systemd_required_services_list: "{{ matrix_appservice_kakaotalk_systemd_required_services_list_default + matrix_appservice_kakaotalk_systemd_required_services_list_auto + matrix_appservice_kakaotalk_systemd_required_services_list_custom }}" -matrix_appservice_kakaotalk_systemd_required_services_list_default: ['docker.service', 'matrix-appservice-kakaotalk-node.service'] +matrix_appservice_kakaotalk_systemd_required_services_list_default: |- + {{ + ([devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else []) + + + ['matrix-appservice-kakaotalk-node.service'] + }} matrix_appservice_kakaotalk_systemd_required_services_list_auto: [] matrix_appservice_kakaotalk_systemd_required_services_list_custom: [] diff --git a/roles/custom/matrix-bridge-mautrix-wsproxy/defaults/main.yml b/roles/custom/matrix-bridge-mautrix-wsproxy/defaults/main.yml index e378c87ed..51ad2a990 100644 --- a/roles/custom/matrix-bridge-mautrix-wsproxy/defaults/main.yml +++ b/roles/custom/matrix-bridge-mautrix-wsproxy/defaults/main.yml @@ -141,7 +141,12 @@ matrix_mautrix_wsproxy_syncproxy_docker_image: "dock.mau.dev/mautrix/syncproxy:{ matrix_mautrix_wsproxy_syncproxy_docker_image_force_pull: "{{ matrix_mautrix_wsproxy_syncproxy_docker_image.endswith(':latest') }}" matrix_mautrix_wsproxy_syncproxy_container_extra_arguments: [] -matrix_mautrix_wsproxy_syncproxy_systemd_required_services_list: ['docker.service', 'matrix-mautrix-wsproxy.service'] +matrix_mautrix_wsproxy_syncproxy_systemd_required_services_list: |- + {{ + ([devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else []) + + + ['matrix-mautrix-wsproxy.service'] + }} matrix_mautrix_wsproxy_syncproxy_systemd_wanted_services_list: [] matrix_mautrix_wsproxy_syncproxy_homeserver_url: '' diff --git a/roles/custom/matrix-conduit/defaults/main.yml b/roles/custom/matrix-conduit/defaults/main.yml index 215ee4a2a..972471dd0 100644 --- a/roles/custom/matrix-conduit/defaults/main.yml +++ b/roles/custom/matrix-conduit/defaults/main.yml @@ -23,7 +23,7 @@ matrix_conduit_tmp_directory_size_mb: 500 # List of systemd services that matrix-conduit.service depends on matrix_conduit_systemd_required_services_list: "{{ matrix_conduit_systemd_required_services_list_default + matrix_conduit_systemd_required_services_list_auto + matrix_conduit_systemd_required_services_list_custom }}" -matrix_conduit_systemd_required_services_list_default: ["docker.service"] +matrix_conduit_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}" matrix_conduit_systemd_required_services_list_auto: [] matrix_conduit_systemd_required_services_list_custom: [] diff --git a/roles/custom/matrix-dendrite/defaults/main.yml b/roles/custom/matrix-dendrite/defaults/main.yml index 356860a04..0d78ebbea 100644 --- a/roles/custom/matrix-dendrite/defaults/main.yml +++ b/roles/custom/matrix-dendrite/defaults/main.yml @@ -178,13 +178,13 @@ matrix_dendrite_process_extra_arguments: [] # List of systemd services that matrix-dendrite.service depends on matrix_dendrite_systemd_required_services_list: "{{ matrix_dendrite_systemd_required_services_list_default + matrix_dendrite_systemd_required_services_list_auto + matrix_dendrite_systemd_required_services_list_custom }}" -matrix_dendrite_systemd_required_services_list_default: ["docker.service"] +matrix_dendrite_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}" matrix_dendrite_systemd_required_services_list_auto: [] matrix_dendrite_systemd_required_services_list_custom: [] # List of systemd services that matrix-dendrite.service wants matrix_dendrite_systemd_wanted_services_list: "{{ matrix_dendrite_systemd_wanted_services_list_default + matrix_dendrite_systemd_wanted_services_list_auto + matrix_dendrite_systemd_wanted_services_list_custom }}" -matrix_dendrite_systemd_wanted_services_list_default: ["docker.service"] +matrix_dendrite_systemd_wanted_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}" matrix_dendrite_systemd_wanted_services_list_auto: [] matrix_dendrite_systemd_wanted_services_list_custom: [] diff --git a/roles/custom/matrix-media-repo/defaults/main.yml b/roles/custom/matrix-media-repo/defaults/main.yml index cb4de902b..e2f6a71a9 100755 --- a/roles/custom/matrix-media-repo/defaults/main.yml +++ b/roles/custom/matrix-media-repo/defaults/main.yml @@ -29,7 +29,7 @@ matrix_media_repo_docker_src_files_path: "{{ matrix_media_repo_base_path }}/dock # List of systemd services that matrix-media-repo.service depends on matrix_media_repo_systemd_required_services_list: "{{ matrix_media_repo_systemd_required_services_list_default + matrix_media_repo_systemd_required_services_list_auto + matrix_media_repo_systemd_required_services_list_custom }}" -matrix_media_repo_systemd_required_services_list_default: ["docker.service"] +matrix_media_repo_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}" matrix_media_repo_systemd_required_services_list_auto: [] matrix_media_repo_systemd_required_services_list_custom: [] diff --git a/roles/custom/matrix-rageshake/defaults/main.yml b/roles/custom/matrix-rageshake/defaults/main.yml index 9289f0dd9..bbd271ec0 100644 --- a/roles/custom/matrix-rageshake/defaults/main.yml +++ b/roles/custom/matrix-rageshake/defaults/main.yml @@ -81,7 +81,7 @@ matrix_rageshake_container_labels_additional_labels: '' matrix_rageshake_container_extra_arguments: [] # List of systemd services that matrix-rageshake.service depends on -matrix_rageshake_systemd_required_services_list: ["docker.service"] +matrix_rageshake_systemd_required_services_list: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}" # List of systemd services that matrix-rageshake.service wants matrix_rageshake_systemd_wanted_services_list: [] diff --git a/roles/custom/matrix-sliding-sync/defaults/main.yml b/roles/custom/matrix-sliding-sync/defaults/main.yml index 2311c1835..d0f0b3028 100644 --- a/roles/custom/matrix-sliding-sync/defaults/main.yml +++ b/roles/custom/matrix-sliding-sync/defaults/main.yml @@ -73,7 +73,7 @@ matrix_sliding_sync_container_extra_arguments: [] # List of systemd services that matrix-sliding-sync-proxy.service depends on matrix_sliding_sync_systemd_required_services_list: "{{ matrix_sliding_sync_systemd_required_services_list_default + matrix_sliding_sync_systemd_required_services_list_auto + matrix_sliding_sync_systemd_required_services_list_custom }}" -matrix_sliding_sync_systemd_required_services_list_default: ["docker.service"] +matrix_sliding_sync_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}" matrix_sliding_sync_systemd_required_services_list_auto: [] matrix_sliding_sync_systemd_required_services_list_custom: [] diff --git a/roles/custom/matrix-synapse/defaults/main.yml b/roles/custom/matrix-synapse/defaults/main.yml index f4364458c..29021ddf1 100644 --- a/roles/custom/matrix-synapse/defaults/main.yml +++ b/roles/custom/matrix-synapse/defaults/main.yml @@ -320,6 +320,12 @@ matrix_synapse_systemd_wanted_services_list_default: [] matrix_synapse_systemd_wanted_services_list_auto: [] matrix_synapse_systemd_wanted_services_list_custom: [] +# List of systemd services that matrix-goofys.service depends on +matrix_synapse_goofys_systemd_required_services_list: "{{ matrix_synapse_goofys_systemd_required_services_list_default + matrix_synapse_goofys_systemd_required_services_list_auto + matrix_synapse_goofys_systemd_required_services_list_custom }}" +matrix_synapse_goofys_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}" +matrix_synapse_goofys_systemd_required_services_list_auto: [] +matrix_synapse_goofys_systemd_required_services_list_custom: [] + # Controls how long to sleep for after starting the matrix-synapse container. # # Delaying, so that the homeserver can manage to fully start and various services diff --git a/roles/custom/matrix-synapse/templates/goofys/systemd/matrix-goofys.service.j2 b/roles/custom/matrix-synapse/templates/goofys/systemd/matrix-goofys.service.j2 index d6094815e..a4b74e67f 100644 --- a/roles/custom/matrix-synapse/templates/goofys/systemd/matrix-goofys.service.j2 +++ b/roles/custom/matrix-synapse/templates/goofys/systemd/matrix-goofys.service.j2 @@ -1,8 +1,9 @@ #jinja2: lstrip_blocks: "True" [Unit] Description=Matrix Goofys media store -After=docker.service -Requires=docker.service +{% for service in matrix_synapse_goofys_systemd_required_services_list %} +Requires={{ service }} +After={{ service }} DefaultDependencies=no [Service]