You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I love these templates. I was about to embark on creating my own templates, but these seem like just the thing I need.
But I need to override some of the defaults. The README says I can set variables, but it isn't clear how. Packer can support multiple var-files, but the bin/box scripts don't provide a way to supply one. Some of the other boxcutter repo README's suggest a Makefile.local file, but then the Makefile wants to build everything, I think?
Can you provide some specific instructions? I'll make a pull request adding them nicely to the README if you like.
The text was updated successfully, but these errors were encountered:
The -var-file flag can be specified multiple times and variables from multiple files will be read and applied. As you'd expect, variables read from files specified later override a variable set earlier if it has already been set.
And from boxcutter/ubuntu README:
We make use of JSON files containing user variables to build specific versions of Ubuntu. You tell packer to use a specific user variable file via the -var-file= command line option. This will override the default options on the core ubuntu.json packer template, which builds Ubuntu 16.04 by default.
So you can specify multiple var-files if building with Packer. I don't use bin/box scripts, so let's wait for someone who knows better.
You may use a combination of -var-file and -var if you want to override more. I find it a bit confusing however the mix of uppercase/lowercase variables description in the README. It makes it read as though one might use shell env vars to override stuff, but that wouldn't work in my experiments.
I managed to adjust bits with something like this, when I needed to override the iso_path (aka "ISO_PATH" in the README):
I love these templates. I was about to embark on creating my own templates, but these seem like just the thing I need.
But I need to override some of the defaults. The README says I can set variables, but it isn't clear how. Packer can support multiple var-files, but the bin/box scripts don't provide a way to supply one. Some of the other boxcutter repo README's suggest a Makefile.local file, but then the Makefile wants to build everything, I think?
Can you provide some specific instructions? I'll make a pull request adding them nicely to the README if you like.
The text was updated successfully, but these errors were encountered: