Skip to content

Instantly share code, notes, and snippets.

@ashim888
Last active August 28, 2016 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashim888/4a0eebfe8f3c4bc1fe03aa3965aa09c7 to your computer and use it in GitHub Desktop.
Save ashim888/4a0eebfe8f3c4bc1fe03aa3965aa09c7 to your computer and use it in GitHub Desktop.
Get digitalocean ID from a packer build
packer build packer-install-template.json | tee output.txt
tail -1 output.txt | head -1 | awk 'match($0, / [0-9]+/) { print substr($0, RSTART, RLENGTH) }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment