Last active
August 28, 2016 11:02
-
-
Save ashim888/4a0eebfe8f3c4bc1fe03aa3965aa09c7 to your computer and use it in GitHub Desktop.
Get digitalocean ID from a packer build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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