phase1: update script

ADP-179_sops_manage_keys
LeeW 11 months ago
parent 651b701896
commit c877192807

@ -2,7 +2,9 @@
# Purpose: manage .sops.yaml based on gpg keys in the same dir _and_ verify correct configuration
set -euo pipefail
sops_config=".sops.yaml"
sops_config_dir="${1?"E: specify dir containing .sops.yaml"}"; shift;
keyfiles_dir="${1?"E: specify dir containing keyfiles"}"; shift;
sops_config="${sops_config_dir}/.sops.yaml"
secrets_file="${1:-0}"
function fn_extract_fpr(){
@ -62,6 +64,7 @@ EOM
}
# UPDATE SOPS CONFIG
pushd "${keyfiles_dir}"
(fn_update_sops_config) > "${sops_config}"
# VERIFY

@ -1,5 +1,7 @@
#!/usr/bin/env bash
set -ueo pipefail
cd "$( dirname "${BASH_SOURCE[0]}")"
curdir="$(realpath $( dirname "${BASH_SOURCE[0]}"))"
cd "$( dirname "${BASH_SOURCE[0]}")/.."
../bin/update_sops.sh
./bin/update_sops.sh "${curdir}" "${PWD}"/

Loading…
Cancel
Save