It should be working on the latest version but personally I think the way Packer has gone about this is wrong. I recommend using the shell-local provision to call ansible-playbook like you would on the commandline so it runs it as Ansible intended. You do require the pywinrm package to be installed on the default python version but at least you are using the supported connection transport that comes with Ansible itself.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/84168986-0a56-43e2-ac9b-e25d31ca3210%40googlegroups.com.
"provisioners": [{"type": "ansible","user": "{{ user `username` }}","playbook_file": "./ansible/site.yml","groups": ["{{ user `ansible_group` }}"],"ansible_env_vars": ["ANSIBLE_CONFIG=../../../ansible/ansible.cfg","ANSIBLE_HOST_KEY_CHECKING=False","ANSIBLE_SSH_ARGS='-o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=30m'"],"extra_arguments": ["-vvv","--extra-vars", "ansible_shell_executable=None ansible_user={{ user `username` }} ansible_password={{ user `password` }} ansible_become_pass={{ user `password` }}","--connection", "packer"]}
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/8d322568-b5b8-4e42-87f5-023277bec8ea%40googlegroups.com.
"provisioners": [{"type": "file","source": "ip.cmd","destination": "C:/tmp/ip.cmd"},{"type": "windows-shell","inline": ["echo [{{ user `ansible_group` }}] > C:/tmp/hosts","C:/tmp/ip.cmd"
]},{"type": "file","direction": "download",
"source": "C:/tmp/hosts","destination": "./ansible/hosts"},{"type": "shell-local","command": "ANSIBLE_CONFIG=./ansible.cfg ansible-playbook -v -i ./ansible/hosts -l \"{{ user `ansible_group` }}\" -e \"ansible_user={{ user `username` }} ansible_password={{ user `password` }} ansible_become_pass={{ user `password` }} ansible_port=5986 ansible_connection=winrm ansible_winrm_server_cert_validation=ignore \" ./ansible/site.yml"}
@echo offFOR /F "tokens=2,3" %%A IN ('ping %computername% -n 1 -4') DO IF "from"== "%%A" set "IP=%%~B"echo %IP:~0,-1% >> C:/tmp/hosts