Auto-populate devture_postgres_systemd_services_to_stop_for_maintenance_list_auto based on devture_systemd_service_manager_services_list_auto

This commit is contained in:
Slavi Pantaleev 2023-09-16 11:46:57 +03:00
parent fbc77fd60c
commit 8baac045b4

View file

@ -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: |
{{