tools(ansible): add no-proxy wrapper for WinRM deploy

This commit is contained in:
igor04091968
2026-05-09 10:13:58 +03:00
parent aa0ccc4ecf
commit c9df042d96
2 changed files with 18 additions and 1 deletions
+1 -1
View File
@@ -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:
+17
View File
@@ -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:<proxy> 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 "$@"