--- - hosts: all roles: - { role: consul, when: '"consul_server" not in group_names' } ...