https://github.com/odg0318/packer-post-processor-shell-with-imageid
This is a plugin of packer post-processor to run script after provioners on googlecompute or amazon.
https://github.com/odg0318/packer-post-processor-shell-with-imageid
aws golang googlecloud packer packer-post-processor
Last synced: 24 days ago
JSON representation
This is a plugin of packer post-processor to run script after provioners on googlecompute or amazon.
- Host: GitHub
- URL: https://github.com/odg0318/packer-post-processor-shell-with-imageid
- Owner: odg0318
- Created: 2016-12-09T09:42:33.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-13T03:51:40.000Z (over 9 years ago)
- Last Synced: 2025-12-17T15:35:37.513Z (4 months ago)
- Topics: aws, golang, googlecloud, packer, packer-post-processor
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# packer-post-processor-shell-with-imageid
This is a plugin of packer post-processor to run script after provioners on googlecompute or amazon.
Usage
=====
* go get https://github.com/odg0318/packer-post-processor-shell-with-imageid
* cd $GOPATH/github.com/odg0318/packer-post-processor-shell-with-imageid
* make install
Example
=======
template.json
```json
"post-processors": [
{
"type": "shell-with-imageid",
"script": "post-processor"
}
]
```
post-processor
```bash
#!/bin/bash
# $1: builder [amazon-ebs, googlecompute], $2: image_id
if [ "$1" == "amazon-ebs" ]
then
python scripts/add_launching_configuration.py $2
fi
if [ "$1" == "googlecompute" ]
then
python scripts/add_instance_template.py $2
fi
```