Packer uses a single json file as config, but you could combine different 
files before using the packer command, e.g. with jq

Another possibility would be to create a base AMI with one packer command 
for the common parts and then create the specific images based on that 
(lets say the base image installs the necessary software and then the 
specific build steps create the config that is different between the 
machines)



On Thursday, September 7, 2017 at 12:18:08 PM UTC+2, Steve Button wrote:
>
> Hi,
>
> I've been searching around for a while and asked a couple of colleagues 
> and none of them know how to solve this. 
>
> We've got a bunch of packer templates, which build AWS AMIs and they are 
> all very similar. This means that when we make changes to one of them, we 
> often have to remember to make the same change to all three. Ideally we'd 
> like to "include" the common code which is shared with all three. Is there 
> a way of doing this? Am I barking up the wrong tree? 
>
> Thanks for your help!
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/1ec089c3-40ac-4190-a7ac-7a8a82a41bc2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to