Skip to content

Commit f5403e9

Browse files
committed
Set a proper number of servers, even if nomad_use_consul is true
Signed-off-by: Maciej Lech <[email protected]>
1 parent a0f567e commit f5403e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

defaults/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ nomad_ports:
141141

142142
### Servers
143143
nomad_group_name: nomad_instances
144-
nomad_servers: "{% if nomad_use_consul == false %}{% set _nomad_servers = [] %}{% for host in groups[nomad_group_name] %}{% set _nomad_node_role = hostvars[host]['nomad_node_role']
144+
nomad_servers: "{% set _nomad_servers = [] %}{% for host in groups[nomad_group_name] %}{% set _nomad_node_role = hostvars[host]['nomad_node_role']
145145
| default('client', true) %}{% if (_nomad_node_role == 'server' or _nomad_node_role == 'both') %}{% if _nomad_servers.append(host) %}{% endif %}{% endif %}{% endfor
146-
%}{{ _nomad_servers }}{% else %}[]{% endif %}"
146+
%}{{ _nomad_servers }}"
147147
nomad_gather_server_facts: false
148148

149149
### Consul

0 commit comments

Comments
 (0)