From 8baac045b4e9b80e1ba376014f3aee71b628dc9d Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sat, 16 Sep 2023 11:46:57 +0300 Subject: [PATCH] Auto-populate devture_postgres_systemd_services_to_stop_for_maintenance_list_auto based on devture_systemd_service_manager_services_list_auto --- group_vars/mash_servers | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/group_vars/mash_servers b/group_vars/mash_servers index e7061b3..6edf6e1 100644 --- a/group_vars/mash_servers +++ b/group_vars/mash_servers @@ -302,16 +302,9 @@ devture_postgres_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_serv devture_postgres_uid: "{{ mash_playbook_uid }}" devture_postgres_gid: "{{ mash_playbook_gid }}" -devture_postgres_systemd_services_to_stop_for_maintenance_list_auto: | - {{ - ([(miniflux_identifier + '.service')] if miniflux_enabled else []) - + - ([(n8n_identifier + '.service')] if n8n_enabled else []) - + - ([(linkding_identifier + '.service')] if linkding_enabled and linkding_database_engine == 'postgres' else []) - + - ([(redmine_identifier + '.service')] if redmine_enabled else []) - }} +# This includes everything for maximum safety. +# It may not be optimal though, because some services may not be dependant on Postgres at all, etc. +devture_postgres_systemd_services_to_stop_for_maintenance_list_auto: "{{ devture_systemd_service_manager_services_list_auto | map(attribute='name') | reject('equalto', (devture_postgres_identifier + '.service')) }}" devture_postgres_managed_databases_auto: | {{