Skip to content

Commit

Permalink
fix: do not restore non-installed services
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kurik committed Jun 21, 2024
1 parent c835b19 commit f963b71
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/restore_services_state.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f963b71

Please sign in to comment.