lib/yun/commands/yun_command.rb in yun-0.0.4 vs lib/yun/commands/yun_command.rb in yun-0.0.5
- old
+ new
@@ -3,20 +3,20 @@
include CommandBase
desc "ssh NODE_NAME", "ssh to a node"
def ssh node_name
- ssh_config = SshConfig.new Config.key_name
node = connection.find node_name
+ ssh_config = SshConfig.new node.user, node.key_name
ssh = Ssh.new node.ip, ssh_config
ssh.connect
end
desc "test NODE_NAME, ROLE", "provision node with chef"
def chef node_name, role
- ssh_config = SshConfig.new Config.key_name
node = connection.find node_name
+ ssh_config = SshConfig.new node.user, node.key_name
ssh = Ssh.new node.ip, ssh_config
ssh.chef role
end