I found a but that was also in 0.12.3 but has continued into -rc1.
On Windows 10, building a RHEL 6 using the "ansible-local" provisioner like this:
"playbook_file": "ansible/main.yml",
The build fails with this message:
vmware-iso: Creating Ansible staging directory...
vmware-iso: Creating directory: \tmp\packer-provisioner-ansible-local\58d02882-7a65-acd4-fb9c-50a008058b5f
vmware-iso: Uploading main Playbook file...
==> vmware-iso: Stopping virtual machine...
Note the incorrect (for Unix) directory slashes for the staging directory.
When I enable debugging and get onto the system before it is destroyed, I see that the staging directory above is created in the root home directory:
/root/\tmp\packer-provisioner-ansible-local\58d02882-7a65-acd4-fb9c-50a008058b5f
Apparently the "directory separators" aren't being changed to reflect the Unix guest.
A workaround is to define the "staging_directory" parameter and manually create and destroy it with script provisioners. My "ansible.sh" script creates the "/root/staging_directory/", and the "cleanup.sh" removes it.
"execute_command": "bash '{{.Path}}'",
"scripts/local_cd_repository.sh",
"playbook_file": "ansible/main.yml",
"staging_directory": "/root/staging_directory/",
"source": "../../ChinaOS/ansible",
"destination": "/root/ChinaOS"
"execute_command": "bash '{{.Path}}'",