Skip to content

Instantly share code, notes, and snippets.

@elbuo8
Created November 30, 2013 01:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save elbuo8/7714478 to your computer and use it in GitHub Desktop.
Save elbuo8/7714478 to your computer and use it in GitHub Desktop.
Simple script to get all the Ansible requirements for DigitalOcean
endpoints=(sizes regions images ssh_keys)
for i in "${endpoints[@]}"; do
url=`printf "https://api.digitalocean.com/%s/?client_id=%s&api_key=%s" $i $DO_CLIENT_ID $DO_API_KEY`
curl $url | python -mjson.tool
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment