Skip to content

Commit 8f47d08

Browse files
committed
Replace implict group for consul hosts
Use ansible_play_hosts instead of an Ansible inventory group 'consul'.
1 parent cf6b942 commit 8f47d08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

roles/vault/tasks/consul.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
-bind "{{ hostvars[inventory_hostname]['ansible_'~consul_bind_interface].ipv4.address }}"
1717
-data-dir /consul/data
1818
-server
19-
-bootstrap-expect "{{ groups['consul'] | length }}"
20-
{% for host in groups['consul'] %}
19+
-bootstrap-expect "{{ ansible_play_hosts | length }}"
20+
{% for host in ansible_play_hosts %}
2121
{% if host != inventory_hostname %}
2222
-retry-join "{{ hostvars[host]['ansible_'~consul_bind_interface].ipv4.address }}"
2323
{% endif %}

0 commit comments

Comments
 (0)