2017-01-14 04:31:10 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: cluster/unseal | Unseal Vault
|
|
|
|
uri:
|
|
|
|
url: "https://localhost:{{ vault_port }}/v1/sys/unseal"
|
|
|
|
headers: "{{ vault_headers }}"
|
|
|
|
method: POST
|
|
|
|
body_format: json
|
|
|
|
body:
|
|
|
|
key: "{{ item }}"
|
|
|
|
with_items: "{{ vault_unseal_keys|default([]) }}"
|
|
|
|
when: vault_is_sealed
|
|
|
|
|
2017-02-09 05:41:36 +08:00
|
|
|
- name: cluster/unseal | Wait until server is ready
|
2017-01-14 04:31:10 +08:00
|
|
|
uri:
|
|
|
|
url: "https://localhost:{{ vault_port }}/v1/sys/health"
|
|
|
|
headers: "{{ vault_headers }}"
|
|
|
|
method: HEAD
|
2017-02-09 05:41:36 +08:00
|
|
|
status_code: 200, 429
|
|
|
|
register: vault_node_ready
|
|
|
|
until: vault_node_ready|succeeded
|
|
|
|
retries: 5
|