fix(ger-nod-02): передавать SSH args через JSON @file
ansible-core-mon / deploy (push) Successful in 25s
ansible-core-net / deploy (push) Successful in 36s
ansible-core-secrets / deploy (push) Successful in 13s
ansible-ger-nod-02 / deploy (push) Failing after 3m21s
ansible-opnsense / deploy (push) Successful in 4s
ansible-rus-central / deploy (push) Successful in 1m6s
ansible-core-mon / deploy (push) Successful in 25s
ansible-core-net / deploy (push) Successful in 36s
ansible-core-secrets / deploy (push) Successful in 13s
ansible-ger-nod-02 / deploy (push) Failing after 3m21s
ansible-opnsense / deploy (push) Successful in 4s
ansible-rus-central / deploy (push) Successful in 1m6s
-e ansible_ssh_common_args=-o ... резало значение по пробелам, ssh получал голый -o и падал с UNREACHABLE. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
385505b5f7
commit
0f7fe4e352
1 file changed
+8
-2
@@ -129,9 +129,15 @@ case "$machine" in
|
||||
apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq sshpass >/dev/null
|
||||
fi
|
||||
# Первичный вход по паролю; после роли host остаётся только ключ раннера.
|
||||
# -e key=value ломает пробелы в ansible_ssh_common_args → JSON через @file.
|
||||
export ANSIBLE_HOST_KEY_CHECKING=False
|
||||
extra+=(-e "ansible_password=${PASS_GER_NOD_02}")
|
||||
extra+=(-e "ansible_ssh_common_args=-o PreferredAuthentications=publickey,password -o StrictHostKeyChecking=accept-new")
|
||||
ger_extra=$(mktemp)
|
||||
python3 -c 'import json,os; print(json.dumps({
|
||||
"ansible_password": os.environ["PASS_GER_NOD_02"],
|
||||
"ansible_ssh_common_args": "-o PreferredAuthentications=publickey,password -o StrictHostKeyChecking=accept-new",
|
||||
}))' >"$ger_extra"
|
||||
extra+=(-e "@${ger_extra}")
|
||||
trap 'rm -f "$ger_extra"' EXIT
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
Reference in new issue
Block a user