bin/awstool in awstool-0.0.2 vs bin/awstool in awstool-0.1.0
- old
+ new
@@ -1,11 +1,18 @@
#!/usr/bin/env ruby
require 'awstool'
require 'pp'
-require 'fog'
options = Awstool::Settings.get_options
+pp options
-instance = Awstool::Instance.new(options)
-instance.launch
-instance.set_dns
+options['hostnames'].each do |hostname|
+ if options['subnet_balance']
+ options['subnet-id-index'] = ( options['subnet-id-index'] + 1 ) % ( options['subnet-ids'].length - 1 )
+ end
+ options['tags']['Name'] = hostname
+ options['hostname'] = hostname
+ instance = Awstool::Instance.new(options)
+ instance.launch
+ instance.set_dns
+end