class Admiral::Layers::AdmiralTestServerspecInstall
Public Class Methods
new(config, ipaddress)
click to toggle source
Calls superclass method
Admiral::LayerBase::new
# File lib/admiral/layers/admiral.test.serverspec.install.rb, line 9 def initialize(config, ipaddress) description = "Install serverspec and infraspec" super(description, config, ipaddress) end
Public Instance Methods
do_action()
click to toggle source
# File lib/admiral/layers/admiral.test.serverspec.install.rb, line 15 def do_action() username = @config['username'] gemsdir = "/tmp/#{username}/gems" cachedir = "#{gemsdir}/cache" env = { 'username' => username, 'GEM_HOME' => gemsdir, 'GEM_PATH' => gemsdir, 'GEM_CACHE' => cachedir, } cmd = "/tmp/#{username}/#{$uid}.sh" rc = run_ssh_command(cmd, :allow_proxy => true, :env => env) return (rc == 0) end