Skip to content

Commit

Permalink
fix(ansible): add no_proxy parameter to use latest ansible (#453)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruzickap authored Feb 25, 2023
1 parent 5accf57 commit ad8a10d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ jobs:
# brew install --cask virtualbox-extension-pack
fi
# renovate: datasource=pypi depName=ansible
ANSIBLE_VERSION="5.10.0"
ANSIBLE_VERSION="7.2.0"
pip3 install ansible=="${ANSIBLE_VERSION}"
if [[ "${BUILD}" =~ windows ]]; then
# renovate: datasource=pypi depName=pywinrm
Expand Down
22 changes: 16 additions & 6 deletions my_windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,23 @@
"type": "powershell"
},
{
"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",
"environment_vars": [
"ANSIBLE_CONFIG=ansible/ansible.cfg",
"ANSIBLE_REMOTE_PORT={{ build `Port` }}",
"ANSIBLE_REMOTE_USER={{ user `winrm_username` }}"
"type": "ansible",
"extra_arguments": [
"-e",
"packer_build_name={{ user `name` }}",
"-e",
"ansible_password='{{ user `winrm_password` }}'",
"-e",
"ansible_winrm_server_cert_validation=ignore",
"-e",
"ansible_winrm_connection_timeout=2000"
],
"type": "shell-local"
"user": "{{ user `winrm_username` }}",
"ansible_env_vars": [
"ANSIBLE_CONFIG=ansible/ansible.cfg"
],
"use_proxy": false,
"playbook_file": "ansible/site.yml"
},
{
"inline": [
Expand Down
22 changes: 16 additions & 6 deletions windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,23 @@
"type": "powershell"
},
{
"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",
"environment_vars": [
"ANSIBLE_CONFIG=ansible/ansible.cfg",
"ANSIBLE_REMOTE_PORT={{ build `Port` }}",
"ANSIBLE_REMOTE_USER={{ user `winrm_username` }}"
"type": "ansible",
"extra_arguments": [
"-e",
"packer_build_name={{ user `name` }}",
"-e",
"ansible_password='{{ user `winrm_password` }}'",
"-e",
"ansible_winrm_server_cert_validation=ignore",
"-e",
"ansible_winrm_connection_timeout=2000"
],
"type": "shell-local"
"user": "{{ user `winrm_username` }}",
"ansible_env_vars": [
"ANSIBLE_CONFIG=ansible/ansible.cfg"
],
"use_proxy": false,
"playbook_file": "ansible/win-simple.yml"
},
{
"inline": [
Expand Down

0 comments on commit ad8a10d

Please sign in to comment.