1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
fedihub-ansible/bin/extra_opts.sh

25 lines
503 B
Bash
Raw Normal View History

2020-07-11 05:49:39 -04:00
FILE=$(readlink -f "$0")
DIR=$(dirname "$FILE")
ROOT=$(dirname "$DIR")
if [ ! -f "$ROOT/admin" ]; then
2020-07-11 05:48:03 -04:00
>&2 echo 'error: admin is not specified'
exit 1
fi
2020-07-11 05:49:39 -04:00
admin="$(cat "$ROOT/admin")"
2020-07-11 05:48:03 -04:00
if [ -z "$admin" ]; then
>&2 echo 'error: admin is not specified'
exit 1
fi
2020-07-11 05:49:39 -04:00
extra_opts="--extra-vars admin=$admin"
2020-07-11 05:32:37 -04:00
2020-10-22 05:33:23 -04:00
for vault_id in kotovalexarian xuhcc postgres website matrix
do
2020-07-11 05:49:39 -04:00
if [ -f "$ROOT/secrets/$vault_id" ]; then
extra_opts="$extra_opts --vault-id $vault_id@$ROOT/secrets/$vault_id"
fi
done