lib/gaptool_client.rb in gaptool-client-0.8.0.pre.alpha2 vs lib/gaptool_client.rb in gaptool-client-0.8.0.pre.alpha3
- old
+ new
@@ -59,13 +59,12 @@
color = opts[:color] || :red
STDERR.puts(Rainbow(message).send(color))
exit code
end
- def self.get_host(node, domain = true)
- domain = domain ? '.gild.com' : ''
- "#{node['role']}-#{node['environment']}-#{node['instance']}#{domain}"
+ def self.get_host(node)
+ "#{node['role']}-#{node['environment']}-#{node['instance']}"
end
def self.ssh_snip_for_node(node)
host = Gaptool.get_host(node)
<<-EOF
@@ -173,10 +172,10 @@
nodes.each { |n| Gaptool.update_ssh_config_for(n, false) }
end
pre = opts[:pre_hooks] || []
post = opts[:post_hooks] || []
nodes = Hash[nodes.map { |n| [n['hostname'], n] }]
- handlers = Hash[nodes.map { |hostname, node| [hostname, InteractionHandler.new(Gaptool.get_host(node, false))] }]
+ handlers = Hash[nodes.map { |hostname, node| [hostname, InteractionHandler.new(Gaptool.get_host(node))] }]
opts = { in: :groups, limit: group_size }
opts = { in: :sequence } if serial
Gaptool.configure_sshkit
on(nodes.keys, opts) do |host|
pre.each { |h| instance_exec(nodes[host.hostname], &h) }