File tree Expand file tree Collapse file tree 4 files changed +12
-3
lines changed
Expand file tree Collapse file tree 4 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,11 @@ Many role variables can also take their values from environment variables as wel
186186- Interval for reconnection attempts to WAN servers
187187- Default value: 30s
188188
189+ ### ` consul_retry_join_skip_hosts `
190+
191+ - If true, the config value for retry_join won't be populated by the default hosts servers. The value can be initialized using consul_join
192+ - Default value: false
193+
189194### ` consul_retry_max `
190195
191196- Max reconnection attempts to LAN servers before failing (0 = infinite)
Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ consul_raft_protocol: "\
8282 {% else %}\
8383 3\
8484 {% endif %}"
85+ consul_retry_join_skip_hosts : false
8586consul_retry_interval : " 30s"
8687consul_retry_interval_wan : " 30s"
8788consul_retry_max : 0
Original file line number Diff line number Diff line change 8383 "retry_max": {{ consul_retry_max | int }},
8484
8585 "retry_join":
86- {% for server in _consul_lan_servers %}
87- {% set _ = consul_join .append (hostvars [server ]['consul_advertise_address' ] | default (hostvars [server ]['consul_bind_address' ])) %}
88- {% endfor %}
86+ {% if not consul_retry_join_skip_hosts %}
87+ {% for server in _consul_lan_servers %}
88+ {% set _ = consul_join .append (hostvars [server ]['consul_advertise_address' ] | default (hostvars [server ]['consul_bind_address' ])) %}
89+ {% endfor %}
90+ {% endif %}
8991 {{ consul_join | map('ipwrap') | list | to_json }},
9092
9193 {## Server/Client ##}
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ consul_raft_protocol: "\
8989 {% else %}\
9090 3\
9191 {% endif %}"
92+ consul_retry_join_skip_hosts : false
9293consul_retry_interval : " 30s"
9394consul_retry_interval_wan : " 30s"
9495consul_retry_max : 0
You can’t perform that action at this time.
0 commit comments