|
|
|
@ -9,11 +9,12 @@ repo_root="$(realpath $(dirname "${BASH_SOURCE[0]}")/..)"
|
|
|
|
keyfiles_dir="${repo_root}"
|
|
|
|
keyfiles_dir="${repo_root}"
|
|
|
|
# assume location of secrets config file in pwd
|
|
|
|
# assume location of secrets config file in pwd
|
|
|
|
sops_config_dir="${PWD}"
|
|
|
|
sops_config_dir="${PWD}"
|
|
|
|
|
|
|
|
# path to role definitions
|
|
|
|
|
|
|
|
roles_def_dir="${repo_root}/roles"
|
|
|
|
|
|
|
|
# optional:
|
|
|
|
|
|
|
|
opt_list_roles=0
|
|
|
|
# optional: secrets files to be updated
|
|
|
|
# optional: secrets files to be updated
|
|
|
|
secrets_file_list=()
|
|
|
|
secrets_file_list=()
|
|
|
|
# optional:
|
|
|
|
|
|
|
|
opt_list_roles=0
|
|
|
|
|
|
|
|
roles_def_dir="${repo_root}/roles"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (( $# >= 1 ));do
|
|
|
|
while (( $# >= 1 ));do
|
|
|
|
cur="${1}";
|
|
|
|
cur="${1}";
|
|
|
|
@ -121,7 +122,7 @@ EOM
|
|
|
|
# UPDATE SOPS CONFIG
|
|
|
|
# UPDATE SOPS CONFIG
|
|
|
|
# TODO: remove the 'pushd;popd' workaround and make the functions aware of the dir being read
|
|
|
|
# TODO: remove the 'pushd;popd' workaround and make the functions aware of the dir being read
|
|
|
|
pushd "${keyfiles_dir}" > /dev/null 2>&1
|
|
|
|
pushd "${keyfiles_dir}" > /dev/null 2>&1
|
|
|
|
if [[ "${opt_list_roles}" ]]; then
|
|
|
|
if [[ "${opt_list_roles}" -eq 1 ]]; then
|
|
|
|
pushd "${roles_def_dir}" > /dev/null 2>&1
|
|
|
|
pushd "${roles_def_dir}" > /dev/null 2>&1
|
|
|
|
>&2 echo "# INFO: listing roles"
|
|
|
|
>&2 echo "# INFO: listing roles"
|
|
|
|
ls -1d *
|
|
|
|
ls -1d *
|
|
|
|
|