add boostrap_expect
This commit is contained in:
parent
904a6bb6d8
commit
b9786ad344
@ -4,7 +4,7 @@ consul_server: True
|
|||||||
consul_ui: True
|
consul_ui: True
|
||||||
consul_iface: "{{ ansible_default_ipv4.interface }}"
|
consul_iface: "{{ ansible_default_ipv4.interface }}"
|
||||||
consul_bind_address: "{{ hostvars[inventory_hostname]['ansible_'+ consul_iface | replace('-', '_')]['ipv4']['address']}}"
|
consul_bind_address: "{{ hostvars[inventory_hostname]['ansible_'+ consul_iface | replace('-', '_')]['ipv4']['address']}}"
|
||||||
consul_client_addr: ""
|
consul_client_addr: "127.0.0.1"
|
||||||
consul_bootstrap: False
|
consul_bootstrap: False
|
||||||
|
|
||||||
consul_data_dir: "/opt/consul"
|
consul_data_dir: "/opt/consul"
|
||||||
@ -24,3 +24,4 @@ consul_servers_list: "\
|
|||||||
|
|
||||||
consul_join: []
|
consul_join: []
|
||||||
consul_join_wan: []
|
consul_join_wan: []
|
||||||
|
consul_bootstrap_expect: 3
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
bootstrap= {{consul_bootstrap|lower}}
|
bootstrap= {{consul_bootstrap|lower}}
|
||||||
server= {{consul_server|lower}}
|
server= {{consul_server|lower}}
|
||||||
|
bootstrap_expect= {{consul_bootstrap_expect}}
|
||||||
{% if consul_bind_address %}
|
{% if consul_bind_address %}
|
||||||
bind_addr="{{consul_bind_address}}"
|
bind_addr="{{consul_bind_address}}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -29,7 +29,7 @@ acl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{% for server in _consul_lan_servers %}
|
{% for server in _consul_lan_servers %}
|
||||||
{% set _ = consul_join.append(hostvars[server]['consul_bind_address'] | default(hostvars[server]['ansible_default_ipv4']['address'],true) | mandatory) %}
|
{% set _ = consul_join.append(hostvars.server['consul_bind_address'] | default(hostvars[server]['ansible_default_ipv4']['address'],true) | mandatory) %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
retry_join= {{ consul_join | map('ipwrap') | list | to_json }}
|
retry_join= {{ consul_join | map('ipwrap') | list | to_json }}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user