In Packer using HCL (making vsphere-iso templates of RHEL and Rocky), I have variables like template_name, template_description and installation_iso_image. Instead of manually changing them every time I want to build RHEL instead of Rocky and vice-versa, how do I “pre-configure” both options and use the right option based on a condition?
EDIT: I guess I should just have rhel.pkrvars.hcl + rocky.pkrvars.hcl with the right values and then explicitly call -var-file= at build time.