Improve vault etcd initialization check (#2959)

pull/2942/merge
Matthew Mosesohn 2018-07-05 12:27:45 +03:00 committed by GitHub
parent 4d7426ec95
commit 0b939a495b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,4 @@
--- ---
- name: cluster/init | wait for vault - name: cluster/init | wait for vault
command: /bin/true command: /bin/true
notify: wait for vault up notify: wait for vault up

View File

@ -9,7 +9,9 @@
# Check if vault is reachable on the localhost # Check if vault is reachable on the localhost
- name: check_vault | Attempt to pull local https Vault health - name: check_vault | Attempt to pull local https Vault health
command: /bin/true command: /bin/true
notify: wait for vault up nowait notify:
- wait for vault up nowait
- set facts about local Vault health
- meta: flush_handlers - meta: flush_handlers
@ -44,6 +46,6 @@
vault_cluster_is_initialized: >- vault_cluster_is_initialized: >-
{{ vault_is_initialized or {{ vault_is_initialized or
hostvars[item]['vault_is_initialized'] or hostvars[item]['vault_is_initialized'] or
'Key not found' not in vault_etcd_exists.stdout|default('Key not found') }} ('value' in vault_etcd_exists.stdout|default('')) }}
with_items: "{{ groups.vault }}" with_items: "{{ groups.vault }}"
run_once: true run_once: true