Skip to content

feat: add adjustable delay after unsealing the vault #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions roles/vault_unseal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Role variables
* `vault_unseal_token`: Token for Vault
* `vault_unseal_username`: Username to login to Vault
* `vault_unseal_verify`: If set, do not verify presented TLS certificate before communicating with Vault server.
* `vault_unseal_timeout`: Control the delay between unsealing the vault and checking its status. Defaults to `0` seconds

Example playbook
----------------
Expand Down
5 changes: 5 additions & 0 deletions roles/vault_unseal/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
username: "{{ vault_unseal_username | default(omit) }}"
verify: "{{ vault_unseal_verify | default(omit) }}"

- name: Wait for vault to be unsealed
wait_for:
timeout: "{{ vault_unseal_timeout | default(0) }}"
delegate_to: localhost

- name: Check if vault is sealed
uri:
url: "{{ vault_api_addr }}/v1/sys/seal-status"
Expand Down
Loading