Sha256: 4b0a01b50d85dec0bebe1186e4090d02b828bec68189d183fa2526606e057f29
Contents?: true
Size: 960 Bytes
Versions: 5
Compression:
Stored size: 960 Bytes
Contents
require 'smart_machine/commands/machine_commands/sub_thor' require 'smart_machine/commands/machine_commands/network' module SmartMachine module Commands class Machine < Thor include Utilities desc "setup", "Initial setup of the machine" def setup inside_machine_dir do machine = SmartMachine::Machine.new machine.setup end end desc "ssh", "SSH into the machine" def ssh inside_machine_dir do ssh = SmartMachine::SSH.new ssh.login end end desc "run [COMMAND]", "Run commands on the machine" map ["run"] => :runner def runner(*args) inside_machine_dir do machine = SmartMachine::Machine.new machine.run_on_machine(commands: "#{args.join(' ')}") end end desc "network", "Run machine network commands" subcommand "network", MachineCommands::Network end end end
Version data entries
5 entries across 5 versions & 1 rubygems