Created
May 7, 2015 18:59
-
-
Save tiernano/f11fbec2075b8bf19d57 to your computer and use it in GitHub Desktop.
export from Route53 to bind files
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
cli53 = '/usr/bin/cli53' | |
zones_on_aws = `#{cli53} list`.lines.select{|e| e =~ /Name/ }.map{|e| e.split(":").last.strip.sub(/\.$/, '') } | |
zones_on_aws.each do | zone | | |
puts "#{zone}..." | |
system("#{cli53} export #{zone} > #{zone}.bind") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment