18 lines
455 B
Bash
Executable File
18 lines
455 B
Bash
Executable File
#!/bin/bash
|
|
|
|
vault_file="vault-secrets.txt"
|
|
|
|
IPS=$(juju status vault --format json | jq -r '.applications.vault.units | to_entries[].value."public-address"')
|
|
|
|
for ip in $IPS
|
|
do
|
|
echo export VAULT_ADDR=http://${ip}:8200;
|
|
export VAULT_ADDR=http://${ip}:8200;
|
|
for vault_key in $(head -n3 ${vault_file} | awk '{print $4}');do
|
|
echo vault operator unseal -tls-skip-verify $vault_key
|
|
vault operator unseal -tls-skip-verify $vault_key
|
|
done
|
|
done
|
|
|
|
|