Cloudbuild and Packer with Ansible provisioner

I’m trying to use Cloudbuild and Packer to create GCE images. I want to use the Ansible provisioner to configure my images. There are community developed cloud builders for Packer and Ansible and I’m wondering if its possible to leverage these two cloud builders separately? I’m trying to avoid having to install Packer and Ansible on single container and keep them separated, but I’m unsure if this is possible?

Packer has to be able to reach Ansible somehow. So if Packer is in a container, maybe you could mount the ansible binary on the container if you don’t want it to be specifically installed? The other option is to install ansible on the instance being provisioned, and use the ansible-local provisioner – but if that instance doesn’t need ansible in the future that feels a little wasteful.

Thanks for the response. I think those are my only two options so I’ll put Packer and Ansible on the same container. I was just trying to avoid creating a custom container and potentially get away with the existing Packer and Ansible community containers.

Yeah, sorry – it sounds like a custom container is the way to go.