Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Commit 3588129

Browse files
committed
fix(ansible): add no_proxy parameter to use latest ansible
1 parent 361b5e5 commit 3588129

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ jobs:
207207
# brew install --cask virtualbox-extension-pack
208208
fi
209209
# renovate: datasource=pypi depName=ansible
210-
ANSIBLE_VERSION="5.10.0"
210+
ANSIBLE_VERSION="7.2.0"
211211
pip3 install ansible=="${ANSIBLE_VERSION}"
212212
if [[ "${BUILD}" =~ windows ]]; then
213213
# renovate: datasource=pypi depName=pywinrm

my_windows.json

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,26 @@
132132
"type": "powershell"
133133
},
134134
{
135-
"command": "ansible-playbook --connection=winrm --extra-vars='packer_build_name={{ user `name` }} ansible_password='{{ user `winrm_password` }}' ansible_winrm_server_cert_validation=ignore ansible_winrm_connection_timeout=2000' -i 127.0.0.1, ansible/site.yml",
136-
"environment_vars": [
135+
"type": "ansible",
136+
"extra_arguments": [
137+
"--communicator",
138+
"winrm",
139+
"-e",
140+
"packer_build_name={{ user `name` }}",
141+
"-e",
142+
"ansible_password='{{ user `winrm_password` }}'",
143+
"-e",
144+
"ansible_winrm_server_cert_validation=ignore",
145+
"-e",
146+
"ansible_winrm_connection_timeout=2000"
147+
],
148+
"ansible_env_vars": [
137149
"ANSIBLE_CONFIG=ansible/ansible.cfg",
138150
"ANSIBLE_REMOTE_PORT={{ build `Port` }}",
139151
"ANSIBLE_REMOTE_USER={{ user `winrm_username` }}"
140152
],
141-
"type": "shell-local"
153+
"use_proxy": false,
154+
"playbook_file": "ansible/site.yml"
142155
},
143156
{
144157
"inline": [

windows.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
"type": "powershell"
136136
},
137137
{
138-
"command": "ansible-playbook --connection=winrm --extra-vars='packer_build_name={{ user `name` }} ansible_password='{{ user `winrm_password` }}' ansible_winrm_server_cert_validation=ignore ansible_winrm_connection_timeout=2000' -i 127.0.0.1, ansible/win-simple.yml",
138+
"command": "ansible-playbook --connection=winrm --extra-vars='use_proxy=false packer_build_name={{ user `name` }} ansible_password='{{ user `winrm_password` }}' ansible_winrm_server_cert_validation=ignore ansible_winrm_connection_timeout=2000' -i 127.0.0.1, ansible/win-simple.yml",
139139
"environment_vars": [
140140
"ANSIBLE_CONFIG=ansible/ansible.cfg",
141141
"ANSIBLE_REMOTE_PORT={{ build `Port` }}",

0 commit comments

Comments
 (0)