Class: Yun::YunCommand

Inherits:
Thor
  • Object
show all
Includes:
CommandBase
Defined in:
lib/yun/commands/yun_command.rb

Instance Method Summary collapse

Methods included from CommandBase

#connection, #init_data

Instance Method Details

#chef(node_name, role) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/yun/commands/yun_command.rb', line 16

def chef node_name, role
  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

#ssh(node_name) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/yun/commands/yun_command.rb', line 7

def ssh node_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