You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have migrated my packer files from json to hcl2. The ansible provisioner does not recognize anymore the "{{ .WinRMPassword }}" template to add the ansible_password as extra-arguments. I have checked the source code of the plugin and I have found out that in case ansible_password is not found in extra-arguments, connection is winrm and 'use proxy' is false, the password gets added by default to the command line and everything works, but maybe this should be added somewhere to the documentation?
The text was updated successfully, but these errors were encountered:
hey @SwampDragons, thank you for your answer. I will give it a try, and indeed seems it will work, but this documentation then conflicts with that of the ansible provisioner, https://www.packer.io/docs/provisioners/ansible/ansible, where it says
"[...] For example, if you are running a Windows build on AWS, Azure, Google Compute, or OpenStack and would like to access the auto-generated password that Packer uses to connect to a Windows instance via WinRM, you can use the template variable {{.WinRMPassword}} in this option. [...]".
In any case, knowing that you guys are aware of this, I guess I can close this issue? :-)
I have migrated my packer files from json to hcl2. The ansible provisioner does not recognize anymore the "{{ .WinRMPassword }}" template to add the ansible_password as extra-arguments. I have checked the source code of the plugin and I have found out that in case ansible_password is not found in extra-arguments, connection is winrm and 'use proxy' is false, the password gets added by default to the command line and everything works, but maybe this should be added somewhere to the documentation?
The text was updated successfully, but these errors were encountered: