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: