From 3393b651ea80f84b05f816d2becc5e11f72fc99e Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sat, 6 Jan 2024 12:06:16 +0200 Subject: [PATCH] Add nextcloud_systemd_wanted_services_list --- defaults/main.yml | 5 +++++ templates/systemd/server.service.j2 | 3 +++ 2 files changed, 8 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 0b73c88..b6c40c1 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -21,6 +21,11 @@ nextcloud_systemd_required_services_list_default: ['docker.service'] nextcloud_systemd_required_services_list_auto: [] nextcloud_systemd_required_services_list_custom: [] +nextcloud_systemd_wanted_services_list: "{{ nextcloud_systemd_wanted_services_list_default + nextcloud_systemd_wanted_services_list_auto + nextcloud_systemd_wanted_services_list_custom }}" +nextcloud_systemd_wanted_services_list_default: [] +nextcloud_systemd_wanted_services_list_auto: [] +nextcloud_systemd_wanted_services_list_custom: [] + nextcloud_base_path: "{{ nextcloud_base_path }}/nextcloud" nextcloud_config_path: "{{ nextcloud_base_path }}/config" nextcloud_data_path: "{{ nextcloud_base_path }}/data" diff --git a/templates/systemd/server.service.j2 b/templates/systemd/server.service.j2 index 5acf1ad..41dca25 100644 --- a/templates/systemd/server.service.j2 +++ b/templates/systemd/server.service.j2 @@ -4,6 +4,9 @@ Description=Nextcloud Server ({{ nextcloud_identifier }}-server) Requires={{ service }} After={{ service }} {% endfor %} +{% for service in nextcloud_systemd_wanted_services_list %} +Wants={{ service }} +{% endfor %} DefaultDependencies=no [Service]