Packer passphase for generated key?

I am using Packer 1.5.6 and Ansible 2.9.9 with the vSphere building attempting to build and configure a Centos 8 image.
I have set the use_proxy = false, and now I run into this:

==> vsphere-iso: Executing Ansible: ansible-playbook -e packer_build_name=vsphere-iso -e packer_builder_type=vsphere-iso -e ansible_ssh_private_key_file=/tmp/ansible-key603204890 -e packer_http_addr=10.208.29.66:8273 --ssh-extra-args -o IdentitiesOnly=yes -i /tmp/packer-provisioner-ansible617777585 /home/dev-user/eclipse-workspace/infrastructure-support-packer/Centos/ansible/playbook-configure-eden.yml -v
    vsphere-iso: Using /home/dev-user/eclipse-workspace/infrastructure-support-packer/Centos/ansible.cfg as config file
    vsphere-iso:
    vsphere-iso: PLAY [Configure the base VM] ***************************************************
    vsphere-iso:
    vsphere-iso: TASK [Gathering Facts] *********************************************************
Enter passphrase for key '/tmp/ansible-key603204890':
Cancelling build after receiving interrupt
==> vsphere-iso: Clear boot order...

Open to suggestions as to how I can work around this!

In the example above, ‘/tmp/ansible-key603204890’ is written as zero bytes long.
Bug report time I think.

In case anyone is interested:
I discovered that the image I built, a Centos 8 (minimal) image did NOT have python installed. It forces you to choose a version to install. Once I did that (python36), Packer could complete the install via Ansible and the prompting for the passphrase was not asked for again, so the issue became a moot point.

1 Like