Closed jrowinski3d closed 1 year ago
Hello. It looks like the problem is in Ansible version: https://github.com/ruzickap/packer-templates/issues/411
Can you please try Ansible 5.x
You are correct @ruzickap . I will see if I can dig into it to determine whats happening with higher versions of Ansible. Something seems to point to https://github.com/ansible/ansible/issues/69542
Just to update, switching to this setup works: Came across this doc: https://docs.ansible.com/ansible/latest/os_guide/windows_winrm.html#what-is-winrm
Specifically talks about the no_proxy option on MacOSX
{
"type": "ansible",
"extra_arguments": [
"-e", "ansible_shell_type=powershell",
"-e", "ansible_shell_executable=None",
"-e", "ansible_winrm_server_cert_validation=ignore",
"-e", "ansible_password='{{ user `winrm_password` }}'"
],
"use_proxy": false,
"playbook_file": "ansible/main.yml",
"user": '{{ user `winrm_user` }}'
},
Just to update, switching to this setup works: Came across this doc: docs.ansible.com/ansible/latest/os_guide/windows_winrm.html#what-is-winrm
Specifically talks about the no_proxy option on MacOSX
{ "type": "ansible", "extra_arguments": [ "-e", "ansible_shell_type=powershell", "-e", "ansible_shell_executable=None", "-e", "ansible_winrm_server_cert_validation=ignore", "-e", "ansible_password='{{ user `winrm_password` }}'" ], "use_proxy": false, "playbook_file": "ansible/main.yml", "user": '{{ user `winrm_user` }}' },
Thank you for the tip. Few years back the packer "ansible" provider was broken and there were some issues with using winrm - that's the reason why I'm not using it.
I tried the code above and it is working fine - I'm going to use it in the templates.
Thank you
PetrR
As per the title, I am getting Connection Refused in my Windows 10 VM.
I put in a breakpoint prior to Ansible and do see that WinRM is running on both HTTP(S).
I am running on on OSX, I am wondering if anyone else has these issues?