I'm getting an error when running the ansible-local
provisioner with a docker builder in Hashicorps Packer.
My template (template.json):
{
"builders": [
{
"type": "docker",
"image": "ubuntu",
"commit": "true"
}
],
"provisioners": [
{
"type": "shell",
"inline": ["sudo apt-get update"]
},
{
"type": "shell",
"script": "setup_ansible.sh"
},
{
"type": "ansible-local",
"playbook_file": "./kubeadm.yml"
}
]
}
The error:
docker: Executing Ansible: cd /tmp/packer-provisioner-ansible-local/5a8f3bad-8413-16c3-b255-6a06a9076ef3 && ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 ansible-playbook /tmp/packer-provisioner-ansible-local/5a8f3bad-8413-16c3-b255-6a06a9076ef3/kubeadm.yml --extra-vars \"packer_build_name=docker packer_builder_type=docker packer_http_addr=\" -c local -i /tmp/packer-provisioner-ansible-local/5a8f3bad-8413-16c3-b255-6a06a9076ef3/packer-provisioner-ansible-local135505282
docker: ERROR! the playbook: packer_builder_type=docker could not be found