packer-plugin-ansible
packer-plugin-ansible copied to clipboard
`ansible_ssh_extra_args` not taken into account when `use_proxy = false`
Overview of the Issue
The ansible_ssh_extra_args
argument is not taken into account when use_proxy = false
.
Reproduction Steps
Go to https://github.com/samuel-phan/packer-ansible-issue-ssh-extra-args and clone the repo and follow the README.
You won't find any ProxyJump
in the logs though we set it in the ansible_ssh_extra_args
:
https://github.com/samuel-phan/packer-ansible-issue-ssh-extra-args/blob/main/packer.pkr.hcl#L65-L67
Enable the use_proxy = true
and you'll find the ProxyJump
in the SSH args.
Plugin and Packer version
Packer v1.7.10 packer-plugin-amazon v1.0.8
Simplified Packer Buildfile
https://github.com/samuel-phan/packer-ansible-issue-ssh-extra-args/blob/main/packer.pkr.hcl
Operating system and Environment details
$ sw_vers
ProductName: macOS
ProductVersion: 11.6.3
BuildVersion: 20G415
$ uname -mrs
Darwin 20.6.0 x86_64
$ ansible --version
ansible [core 2.11.4]
config file = None
configured module search path = ['/Users/sphan02/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.9/site-packages/ansible
ansible collection location = /Users/sphan02/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.9.10 (main, Jan 15 2022, 11:48:00) [Clang 13.0.0 (clang-1300.0.29.3)]
jinja version = 2.11.2
libyaml = True
Log Fragments and crash.log files
https://gist.github.com/samuel-phan/0fdf4a976b237258f301245606dc16cb