Hello
you can put into variables all the info for ubuntu into
ubuntu.json
and all the debian into
debian.json
then use
packer build -var-file ubuntu.json template.json
if you need to use this on the provisioner, say you got different chef
playbooks, you could use then
{
"variables": {
"build_name": "",
..
},
},
"builders": [
{
"name": "{{ user `build_name` }}",
..
"type": "virtualbox-iso"
}
],
"provisioners": [
{
"only": "ubuntu"
...
}
],
"provisioners": [
{
"only": "debian"
..
}
]
}
just add a variable to each json and the template for build_name
hope this helps.
alvaro.
--
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/CAHqq0ey4kqch6vu79GUKhmy9smo%2BXPNbzfUc83dKqnHDDxEC6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.