Hi,
I am running a script in provisioners section, which requires AMI name used
by packer. I know the pre-validation of AMI name by packer happens before
this stage. Is there any reliable way in which I can get the ami_name
inside my script ?
My script would go like this:
"provisioners": [ { "type": "shell", "execute_command": "sudo {{.Vars}}
bash '{{.Path}}'", "scripts": [ "./scripts/packer/myscript.sh" ] } ]
./scripts/packer/myscript.sh:
#!/usr/bin/env bash aminame=$ami_name make_an_external_call "$aminame"
--
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/a88ca74e-0415-4b96-ad5a-340af42f0d36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.