Skip to content

Instantly share code, notes, and snippets.

@overdrive3000
Created August 4, 2014 03:58
Show Gist options
  • Save overdrive3000/c7e8f1be6cfe2aad3f73 to your computer and use it in GitHub Desktop.
Save overdrive3000/c7e8f1be6cfe2aad3f73 to your computer and use it in GitHub Desktop.
Snippet to create a Digital Ocean DNS Record
#!/usr/bin/env python
import os
from dopy.manager import DoManager
client_id = os.environ['DO_CLIENT_ID']
api_key = os.environ['DO_API_KEY']
domains = DoManager(client_id, api_key)
print domains.all_domains()
print "create a new domain record"
domains.new_domain_record(345504, "A", "192.168.30.254", "ansible")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment