Created
August 4, 2014 03:58
-
-
Save overdrive3000/c7e8f1be6cfe2aad3f73 to your computer and use it in GitHub Desktop.
Snippet to create a Digital Ocean DNS Record
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
#!/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