Class: ServerTools::CLI

Inherits:
Thor
  • Object
show all
Includes:
ShellOut
Defined in:
lib/server_tools/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ShellOut

#shell_out

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/server_tools/cli.rb', line 11

def self.exit_on_failure?
  true
end

Instance Method Details

#bootstrap(hostname) ⇒ Object



31
32
33
# File 'lib/server_tools/cli.rb', line 31

def bootstrap(hostname)
  shell_out(ServerTools::Bootstrap.new(hostname, options).command)
end

#install_deb_package(hostname) ⇒ Object



61
62
63
64
65
# File 'lib/server_tools/cli.rb', line 61

def install_deb_package(hostname)
  install_deb_package = ServerTools::InstallDebPackage.new(hostname, options)
  shell_out(install_deb_package.copy_command)
  shell_out(install_deb_package.install_command)
end

#provision(hostname) ⇒ Object



40
41
42
# File 'lib/server_tools/cli.rb', line 40

def provision(hostname)
  shell_out(ServerTools::Provision.new(hostname, options).command)
end