Module: NodeSpec::LocalCommandRunner

Includes:
CommandExecution
Included in:
Provisioning::Ansible
Defined in:
lib/nodespec/local_command_runner.rb

Instance Method Summary collapse

Methods included from CommandExecution

#execute_within_timeout

Methods included from VerboseOutput

#verbose_puts

Instance Method Details

#run_command(command) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/nodespec/local_command_runner.rb', line 9

def run_command command
  execute_within_timeout(command) do
    output, status = Open3.capture2e(command)
    verbose_puts(output)
    status.success?
  end
end