Update to 2024-10-24 12:00

This commit is contained in:
Daniel Berteaud
2024-10-24 12:00:41 +02:00
parent 7ae7f41b2c
commit 882623afc1
6 changed files with 25 additions and 2 deletions

View File

@@ -1,5 +1,11 @@
---
- name: Install dependencies
package:
name:
- jq
tags: vault
- name: Deploy systemd service unit
template: src=vault.service.j2 dest=/etc/systemd/system/vault.service
register: vault_unit

View File

@@ -7,5 +7,8 @@ if [ -e /etc/profile.d/vault.sh ]; then
source /etc/profile.d/vault.sh
fi
export VAULT_TOKEN={{ vault_backup_token }}
# Direct snapshot requ to the active leader, see
# https://support.hashicorp.com/hc/en-us/articles/22097624571155-Vault-snapshot-save-fails-with-message-Error-taking-snapshot-incomplete-snapshot-unable-to-read-SHA256SUMS-sealed-file
export VAULT_ADDR=$(vault status -format json | jq -r .leader_address)
vault operator raft snapshot save {{ vault_root_dir }}/backup/vault.snap
{% endif %}