From c9df042d96d55237331fd62945a27726fddefcfb Mon Sep 17 00:00:00 2001 From: igor04091968 Date: Sat, 9 May 2026 10:13:58 +0300 Subject: [PATCH] tools(ansible): add no-proxy wrapper for WinRM deploy --- ansible/README.md | 2 +- ansible/run_deploy_aw_windows.sh | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 ansible/run_deploy_aw_windows.sh diff --git a/ansible/README.md b/ansible/README.md index 671cfa8..9baec79 100644 --- a/ansible/README.md +++ b/ansible/README.md @@ -96,7 +96,7 @@ ansible-playbook -i inventory.ini provision_proxmox_ct_matrix_and_deploy_aw.yml ```bash cd ansible -ansible-playbook -i inventory.ini deploy_aw_windows.yml +AW_WINRM_PASSWORD='...' bash ./run_deploy_aw_windows.sh ``` Playbook: diff --git a/ansible/run_deploy_aw_windows.sh b/ansible/run_deploy_aw_windows.sh new file mode 100644 index 0000000..5276ed2 --- /dev/null +++ b/ansible/run_deploy_aw_windows.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +set -euo pipefail + +# WinRM uses requests/pywinrm which may pick up local proxy settings (systemd env, shells, etc). +# If that happens, WinRM traffic can be sent to 127.0.0.1: and time out. +# This wrapper hard-disables proxy env vars to make deploy deterministic. + +if [[ -z "${AW_WINRM_PASSWORD:-}" ]]; then + echo "ERROR: AW_WINRM_PASSWORD is not set" >&2 + echo "Usage: AW_WINRM_PASSWORD='...' ./run_deploy_aw_windows.sh [ansible-playbook args...]" >&2 + exit 2 +fi + +unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY all_proxy ALL_PROXY + +exec ansible-playbook -i inventory.ini deploy_aw_windows.yml "$@" +