Ansible uses ssh to connect and run the playbook. Here in packer how ansible provisioner connect to the machine in order to run playbook. And other scenario, we want to use our own generated ssh key. How to use that. Please help me to understand. Overall your session is great!!
The Ansible provisioner in Packer connects use SSH. During the build process, Packer initiates an SSH connection to the instance using the same information provided in the source block. I suppose we can utilize this in source block ssh_private_key_file = var.ssh_private_key_file like terraform.