Hi,
I know that the ansible provisioner is only community supported, so hoping for help here.
I'm using packer to build a windows server image and winrm is working fine using these commands in the userdata to setup winrm:
iex "c:\ConfigureRemotingForAnsible.ps1 -SkipNetworkProfileCheck -ForceNewSSLCert"
After it does some configuration without issues, so winrm seems fine for packer.
Now I want to run an ansible playbook to configure more software and start tests.
This is the provisioner:
{
"type": "ansible",
"playbook_file":
"tasks/install_software.yml",
"user": "Administrator",
"extra_arguments": [
"--connection", "packer",
"-vvv",
"--extra-vars", "ansible_shell_type=powershell ansible_shell_executable=None ansible_password={{ .WinRMPassword }}"
]
},
I have the packer.py connection plugin in a directory next to the playbook.
This is the error message I receive:
ssl: the specified credentials were rejected by the server
Let me know if I can provide more details or help with testing.
Thank you for your help!