I am following this guide for template pipelining:
I have created about 6 scripts and chained them together to generate one VM.
I would now like to modify these scripts to output different VM versions for different purposes.
For example, I have one script which installs all 3rd party software. I have small differences between 2 VMs on what software should be installed.
My problem is this:
To filter provisioners based on VM type I need to define multiple sources for a build.
If I define multiple build sources in the script I will get multiple VM outputs. If I have two scripts in a row which does this I will start to get “thrash VMs” which I need to throw away because I do not know how to tell the scripts that they should only run one of the sources at a time.
Have I misunderstood something here?
Is there a mechanism where I can tell the script to only use one of the two sources when I build?
Is there some other mechanism for filtering provisioners?
Should I follow some other process for pipelining packer scripts together and still be able to generate different VM types using the same scripts?