From f963b7108dec211c5b62778edfebfe961a000ec9 Mon Sep 17 00:00:00 2001 From: Jan Kurik Date: Fri, 21 Jun 2024 08:32:43 +0200 Subject: [PATCH] fix: do not restore non-installed services Some services might not be installed (i.e. redis) if a relevant subrole is not used (i.e. performancecopilot.metrics.redis). Thus an attempt to restore such a service fails. This commit adds a check for the service presence before its restoration. --- tests/restore_services_state.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/restore_services_state.yml b/tests/restore_services_state.yml index 8f701b5..d05c895 100644 --- a/tests/restore_services_state.yml +++ b/tests/restore_services_state.yml @@ -15,6 +15,7 @@ when: - item + '.service' in final_state.ansible_facts.services - item + '.service' in initial_state.ansible_facts.services + - initial_state.ansible_facts.services[item + '.service'].status != "not-found" with_items: - pmcd - pmlogger