release 1.13.6: env-only machine paths and SSH hosts
Load ~/.config/taler-monitoring/env (taler-monitoring-env profiles) before suite defaults. Drop hardcoded operator homes and host aliases from scripts; apply/staging/www/secrets/wallet via env.
This commit is contained in:
parent
d7a0ceb90b
commit
0c94fb3d2e
32 changed files with 175 additions and 157 deletions
|
|
@ -195,25 +195,20 @@ resolve_explorer_pw() {
|
|||
|| [[ "${TALER_DOMAIN:-}" == stage.*lefrancpaysan* ]] \
|
||||
|| [[ "${TALER_DOMAIN:-}" == *stage.lefrancpaysan* ]]; then
|
||||
for f in \
|
||||
"${FRANCPAYSAN_SECRETS:-}/stage/bank-explorer-password.txt" \
|
||||
"${HOME}/francpaysan-secrets/stage/bank-explorer-password.txt" \
|
||||
"${HOME}/src/francpaysan-secrets/stage/bank-explorer-password.txt" \
|
||||
"${HOME}/taler/src/francpaysan-secrets/stage/bank-explorer-password.txt" \
|
||||
${FRANCPAYSAN_SECRETS:+"${FRANCPAYSAN_SECRETS}/stage/bank-explorer-password.txt"} \
|
||||
"${HOME}/.config/taler-landing/stage-bank-explorer-password.txt"
|
||||
do
|
||||
[ -n "$f" ] && [ -f "$f" ] || continue
|
||||
tr -d '\n\r' <"$f"
|
||||
return 0
|
||||
done
|
||||
for host in \
|
||||
"${INSIDE_SSH:-}" \
|
||||
francpaysan-stage-user \
|
||||
francpaysan-host
|
||||
do
|
||||
[ -n "$host" ] || continue
|
||||
_remote_exp="${FRANCPAYSAN_REMOTE_BANK_EXPLORER_SECRET:-}"
|
||||
[ -z "$_remote_exp" ] && [ -n "${FRANCPAYSAN_REMOTE_SECRETS_ROOT:-}" ] && \
|
||||
_remote_exp="${FRANCPAYSAN_REMOTE_SECRETS_ROOT}/bank/secrets/bank-explorer-password.txt"
|
||||
for host in ${INSIDE_SSH:+"$INSIDE_SSH"} ${FRANCPAYSAN_SSH:+"$FRANCPAYSAN_SSH"}; do
|
||||
[ -n "$host" ] && [ -n "$_remote_exp" ] || continue
|
||||
pw=$(ssh -o BatchMode=yes -o ConnectTimeout=12 "$host" \
|
||||
'tr -d "\n\r" </mnt/data/stagepaysan/bank/secrets/bank-explorer-password.txt 2>/dev/null \
|
||||
|| sudo tr -d "\n\r" </mnt/data/stagepaysan/bank/secrets/bank-explorer-password.txt 2>/dev/null' \
|
||||
"tr -d '\\n\\r' <${_remote_exp} 2>/dev/null || sudo tr -d '\\n\\r' <${_remote_exp} 2>/dev/null" \
|
||||
2>/dev/null || true)
|
||||
if [ -n "$pw" ]; then
|
||||
printf '%s' "$pw"
|
||||
|
|
@ -230,7 +225,6 @@ resolve_explorer_pw() {
|
|||
fi
|
||||
for f in \
|
||||
"${SECRETS_ROOT:+${SECRETS_ROOT}/taler-bank/bank-explorer-password.txt}" \
|
||||
"${HOME}/src/koopa/koopa-admin-secrets/koopa/host-root/taler-bank/bank-explorer-password.txt" \
|
||||
"${HOME}/.config/taler-landing/bank-explorer-password.txt"
|
||||
do
|
||||
[ -n "$f" ] && [ -f "$f" ] || continue
|
||||
|
|
@ -962,23 +956,21 @@ if [ "${LADDER_PAY}" = "1" ] && [ -n "${PAY_LIST:-}" ] && [ "$FAIL_N_L" -eq 0 ];
|
|||
MPW=$(read_secret "taler-merchant/merchant-goa-demo-cp4zqk-password.txt" 2>/dev/null || true)
|
||||
fi
|
||||
if [ -z "$MPW" ] && [ "${CUR}" = "TESTPAYSAN" ]; then
|
||||
for f in \
|
||||
"${FRANCPAYSAN_SECRETS:-}/stage/default-instance-token.txt" \
|
||||
"${HOME}/francpaysan-secrets/stage/default-instance-token.txt" \
|
||||
"${HOME}/src/francpaysan-secrets/stage/default-instance-token.txt"
|
||||
do
|
||||
[ -f "$f" ] || continue
|
||||
MPW=$(tr -d '\n\r' <"$f")
|
||||
break
|
||||
done
|
||||
if [ -n "${FRANCPAYSAN_SECRETS:-}" ] && [ -f "${FRANCPAYSAN_SECRETS}/stage/default-instance-token.txt" ]; then
|
||||
MPW=$(tr -d '\n\r' <"${FRANCPAYSAN_SECRETS}/stage/default-instance-token.txt")
|
||||
fi
|
||||
if [ -z "$MPW" ]; then
|
||||
for host in "${INSIDE_SSH:-}" francpaysan-stage-user francpaysan-host; do
|
||||
[ -n "$host" ] || continue
|
||||
_remote_mer="${FRANCPAYSAN_REMOTE_MERCHANT_TOKEN:-}"
|
||||
[ -z "$_remote_mer" ] && [ -n "${FRANCPAYSAN_REMOTE_SECRETS_ROOT:-}" ] && \
|
||||
_remote_mer="${FRANCPAYSAN_REMOTE_SECRETS_ROOT}/merchant/secrets/default-instance-token.txt"
|
||||
for host in ${INSIDE_SSH:+"$INSIDE_SSH"} ${FRANCPAYSAN_SSH:+"$FRANCPAYSAN_SSH"}; do
|
||||
[ -n "$host" ] && [ -n "$_remote_mer" ] || continue
|
||||
MPW=$(ssh -o BatchMode=yes -o ConnectTimeout=12 "$host" \
|
||||
'tr -d "\n\r" </mnt/data/stagepaysan/merchant/secrets/default-instance-token.txt 2>/dev/null || true' \
|
||||
"tr -d '\\n\\r' <${_remote_mer} 2>/dev/null || true" \
|
||||
2>/dev/null || true)
|
||||
[ -n "$MPW" ] && break
|
||||
done
|
||||
unset _remote_mer
|
||||
fi
|
||||
fi
|
||||
if [ -z "$MPW" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue