Hi everyone,
I have a problem with Packer and the ansible provisioner (not local).
I am trying to build Vmware templates with vsphere-iso (2.3) and packer (1.3.5).
I can build a template but when ansible is executing the playbook all is set to "ok" and there are no "changed"...
When I start the template on a VM I can see that nothing that was supposed to be done is in fact done.
It seems that the playbook is not "applied" on the host started by Packer.
My ansible part of my json :
"provisioners": [
{
"type": "ansible",
"playbook_file": "/etc/ansible/playbook/playbook.yml",
"ansible_env_vars": [ "ANSIBLE_HOST_KEY_CHECKING=False", "ANSIBLE_STDOUT_CALLBACK=full_skip"],
"user": "infra",
"extra_arguments": [
"--extra-vars", "ansible_become_pass=apassword"
]
}
]
It is a Ubuntu 18.04.
As I'm writing for a problem I can mention that with Ubuntu18.04 with netplan the IP address affected by packer is not removed when the VM is converted to a template so anytime you use this template you find your new vm with the new IP and the one that was
assigns by packer to the VM used to build the template (If anyone as a way to resolv this too...)
Thanks in advance for you help.
Regards,