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]