Created
May 16, 2011 12:48
-
-
Save lukesmith/974384 to your computer and use it in GitHub Desktop.
Ruby script to update a point dns record with the public ec2 instance ip address
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
require 'open-uri' | |
require 'point' | |
ip = open('http://169.254.169.254/latest/meta-data/public-ipv4').read | |
Point.username = "user@example.com" | |
Point.apitoken = "......" | |
zone = Point::Zone.find(<ZoneId>) # example.com | |
record = zone.record(<RecordId>) # teamcity.example.com | |
record.data = ip | |
record.save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment