Sha256: 6f3282861bc74700e9cb95fd21a1860a637e8848e704666d5d3d57244f1e0b53

Contents?: true

Size: 648 Bytes

Versions: 1

Compression:

Stored size: 648 Bytes

Contents

module Yun
  class YunCommand < Thor

    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 = 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 = Ssh.new node.ip, ssh_config

      ssh.chef role
    end

    register NodeCommand, :node, "node SUBCOMMAND", "commands for node"

    private
  end
end

Yun::YunCommand.start

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yun-0.0.4 lib/yun/commands/yun_command.rb