Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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