Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make keep_input_artifact value a variable #87

Open
ferrarimarco opened this issue Nov 28, 2016 · 3 comments
Open

Make keep_input_artifact value a variable #87

ferrarimarco opened this issue Nov 28, 2016 · 3 comments

Comments

@ferrarimarco
Copy link

Hi all. I would like to use these packer templates as a base for other images. This could be achieved by setting the keep_input_artifact configuration value in a variable with the default value of false. With this change, a user of this template could:

  1. Set the value of that variable to true
  2. Feed the artifacts to other builders in another template to iterate over them, mainly to perform additional provisioning

I can provide a pull request for this, thanks.

@ferrarimarco ferrarimarco changed the title Make the keep_input_file a variable Make the keep_input_artifact a variable Nov 28, 2016
@ferrarimarco ferrarimarco changed the title Make the keep_input_artifact a variable Make keep_input_artifact value a variable Nov 28, 2016
@annawake
Copy link
Contributor

What do you think you would be provisioning additionally?

The intent is that these are "JEOS boxes" (Just Enough OS...for a configuration management system). There really shouldn't be much more that should be done in another template besides calling a CM system to do the rest of the work, like Chef, Ansible, Puppet or Saltstack. What do you have in mind?

That being said, we've had issues with packer not supporting boolean values as variables (basically anything that is not a string. Have you tested this to make sure it's even possible with the latest packer? As I recall it packer won't accept this value as a string and it might not be able to parametize like you are thinking.

@ferrarimarco
Copy link
Author

ferrarimarco commented Nov 28, 2016

I am using the ubuntu 16.04 boxcutter box as a base for a couple of other vagrant boxes (this is the latest one, open-development-environment-devbox). I would like to avoid the provisioning phase each time I destroy my boxes.

According to hashicorp/packer#1913 it should work (it was the very same use case BTW). There is also a possible regression in hashicorp/packer#2630
I am testing it now with the latest packer (0.12.0) and let you know.

Edit ( @annawake ): it did not work. I am providing information in hashicorp/packer#2630

@ferrarimarco
Copy link
Author

ferrarimarco commented Mar 14, 2017

@annawake Appartently a fix for this issue is low on the Packer devs list of priorities

Is it possible to set this flag to true in this repository? Anyway keeping the input artifact allows to pipe the output of your build to another Packer build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants