fix etcd health check bug (#1480)
This commit is contained in:
parent
cfea99c4ee
commit
0b60201a1e
1 changed files with 4 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
||||||
uri:
|
uri:
|
||||||
url: "{{ vault_etcd_url }}/health"
|
url: "{{ vault_etcd_url }}/health"
|
||||||
validate_certs: no
|
validate_certs: no
|
||||||
|
return_content: yes
|
||||||
until: vault_etcd_health_check.status == 200 or vault_etcd_health_check.status == 401
|
until: vault_etcd_health_check.status == 200 or vault_etcd_health_check.status == 401
|
||||||
retries: 10
|
retries: 10
|
||||||
delay: 2
|
delay: 2
|
||||||
|
@ -14,7 +15,9 @@
|
||||||
|
|
||||||
- name: check_etcd | Set fact based off the etcd_health_check response
|
- name: check_etcd | Set fact based off the etcd_health_check response
|
||||||
set_fact:
|
set_fact:
|
||||||
vault_etcd_available: "{{ vault_etcd_health_check.get('json', {}).get('health')|bool }}"
|
vault_etcd_available: "{{ vault_etcd_health_check.content }}"
|
||||||
|
- set_fact:
|
||||||
|
vault_etcd_available: "{{ vault_etcd_available.health|d()|bool }}"
|
||||||
|
|
||||||
- name: check_etcd | Fail if etcd is not available and needed
|
- name: check_etcd | Fail if etcd is not available and needed
|
||||||
fail:
|
fail:
|
||||||
|
|
Loading…
Reference in a new issue