From 745c1b5dc0af9efd1b93848f10f54036838775fd Mon Sep 17 00:00:00 2001 From: ace Date: Fri, 9 Sep 2022 13:03:05 +0300 Subject: [PATCH] fix agent config generation when no agent group is defined --- tasks/config.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/config.yaml b/tasks/config.yaml index 39152c7..939075c 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -26,7 +26,9 @@ when: consul_ssl - name: Merge config for Consul agent - when: inventory_hostname in groups[consul_agent_group] + when: + - groups[consul_agent_group] is defined + - inventory_hostname in groups[consul_agent_group] block: - name: Merge config for Consul agent set_fact: