Hi there,
currently I try to understand packer in combination with ansible a little bit better.
My goal is to create an automatically installed and configured homelab with the standard infrastructure (dc, subordinate pki, azure integration and so on).
I am making good progress. NNow I am standing in front of one of those design decisions, which are hard for me.
I am using ansible playbooks to prepare the basic packer vm images. They prepare some scripts, updates and systprep the machine. Then I shelf them and use terraform to prepare the real infra. Later ansible runs over the machines again and does the configuration / import tasks paired with final and regular updates rounds.
(Please do not overrate the tasks. All literally runs like garbage atm. A lot of optimization needs to be done).
From Terraform I learned that Terraform decides when create the ressources. I would like to have a serialized approach to packer provisioners for ensuring that I can have very modular ansible scripts.
I want to make sure that the machine would never be sysprepped before doing the other tasks.
I do not want to handle that in ansible, because I want to keep small and easy to understand scripts in my repos. Many of my tasks may run in a home lab, but I want to optimize towards enterprise networks to sharpen my brain-ish tool.
Question: How das packer handle provisioners?
Did I miss something the the docs, because it feels like it serializes. Maybe learning packer and Terraform at the same time explodes my brain. I think many of you faced such challenges already.
Thanks for your advice