The following commits build on work from @vtolstov to create a
post processor shell-local plugin. Please see his original work
over at https://github.com/vtolstov/packer-post-processor-shell
I have modified it slightly to output information onto the packer
ui as shown in the below screenshot which executes a script that
runs env.
This plugin enables users to submit environmental variables to
external external shell script(s) to do some post processing
e.g. (Upload to somewhere, convert to different format, and so
on)
Most of the work is a merge from the provisioner shell and
shell-local scripts.
![Example run of post processor shell-local](http://i.imgur.com/kJv6j9l.png)
Signed-off-by: Ian Duffy <ian@ianduffy.ie>
- Import errors were not very useful messages, obtain the import status
from the import task as AWS reports it
- Interpolate s3_key_name as per PR comments (rather than hard-code the
generated parts of the default value)
- Remove descriptions on AWS import job, they are optional anyway.
- s3_key_name is now optional, default is equivilent to
"packer-import-{{timestamp}}"
- Remove restriction on builder used, anything producing an OVA is okay
- Fix task and ova description passed to import API call, correctly
adds timestamp to both
- Documentation updated
- Remove VMware-specific text
- Mark s3_key_name as optional
- Remove s3_key_name from example now it's optional
- Explain the import process more clearly in example
- Tags follows the same approach as the amazon-ebs builder
- Clean up some debug messages
- Improve readability by pulling out AMI id into seperate variable
Note: this duplicates the tag creation code in
builder/amazon/common/step_create_tags.go. Maybe this should be a multistep
post-processor instead, and we re-use steps from the builder.
- S3 object uploaded removed after import (with disable option)
- Indicate to user when import is complete
- Close the source file uploaded after upload is done
- Each step of import process logs a debug message
If `format` option is configured, packer exports the VM with ovftool.
website: Document about OVF Tool and `format` option.
post-processor/vsphere: Enable to use `mitchellh.vmware-esx` artifact type and OVF and OVA formats, fixes#1457.