I’m completely at a loss here …
I come from an organisation where we deployed VM’s with pxe boot, kickstarts (or similar) and Satellite or Foreman Katello for repo’s and lifecycle management. I used Ansible for templating kickstarts pre-deployment, creating and booting the VM and for post-deployment and configuration management.
I am in a new organisation where we cannot use pxe boot. I thought I could use Packer to build images, and I have got that working fine. I figured my workflow would be to start an Ansible playbook that generates my kickstarsts, let Packer create the VM and build it, then continue with Ansible to finish the configuration.
I got happy when I read about the Ansible provisioner … but I can’t find the right information on how that is supposed to work? I read Packer starts an SSH server for the guest VM to connect to? I tried the simple example given on the Packer Ansible provisioner docs, but that doesn’t work (httpd is not installed but the deploy finishes without a hitch). It also won’t use other users, uses its own private key …
I am beginning to think that my mindset is wrong and I should be using Packer in a different way.
Can someone explain what workflow should best be used? I think Ansible is perfect for generating kickstarts, heck I could even template HCL and generate Packer templates and spawn 10 packer processes to deploy 10 VM’s at a time. I think Packer can already do that though, but Im lost at how I get 10 kickstarts and how I can finish configuration management.
PS. Our guests are unable to connect back to the Packer host (ie, ansible controller).
Thanks!