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

Commit 3cb1245

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

File tree

3 files changed

+35
-11
lines changed

3 files changed

+35
-11
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: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,25 @@
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+
"-e",
138+
"packer_build_name={{ user `name` }}",
139+
"-e",
140+
"ansible_password='{{ user `winrm_password` }}'",
141+
"-e",
142+
"ansible_winrm_server_cert_validation=ignore",
143+
"-e",
144+
"ansible_winrm_connection_timeout=2000"
145+
],
146+
"user": "{{ user `winrm_username` }}",
147+
"ansible_env_vars": [
148+
"no_proxy=\"*\"",
137149
"ANSIBLE_CONFIG=ansible/ansible.cfg",
138-
"ANSIBLE_REMOTE_PORT={{ build `Port` }}",
139-
"ANSIBLE_REMOTE_USER={{ user `winrm_username` }}"
150+
"ANSIBLE_REMOTE_PORT={{ build `Port` }}"
140151
],
141-
"type": "shell-local"
152+
"use_proxy": false,
153+
"playbook_file": "ansible/site.yml"
142154
},
143155
{
144156
"inline": [

windows.json

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,25 @@
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",
139-
"environment_vars": [
138+
"type": "ansible",
139+
"extra_arguments": [
140+
"-e",
141+
"packer_build_name={{ user `name` }}",
142+
"-e",
143+
"ansible_password='{{ user `winrm_password` }}'",
144+
"-e",
145+
"ansible_winrm_server_cert_validation=ignore",
146+
"-e",
147+
"ansible_winrm_connection_timeout=2000"
148+
],
149+
"user": "{{ user `winrm_username` }}",
150+
"ansible_env_vars": [
151+
"no_proxy=\"*\"",
140152
"ANSIBLE_CONFIG=ansible/ansible.cfg",
141-
"ANSIBLE_REMOTE_PORT={{ build `Port` }}",
142-
"ANSIBLE_REMOTE_USER={{ user `winrm_username` }}"
153+
"ANSIBLE_REMOTE_PORT={{ build `Port` }}"
143154
],
144-
"type": "shell-local"
155+
"use_proxy": false,
156+
"playbook_file": "ansible/win-simple.yml"
145157
},
146158
{
147159
"inline": [

0 commit comments

Comments
 (0)