Module: ForemanRemoteExecutionCore

Extended by:
ForemanTasksCore::SettingsLoader
Defined in:
lib/foreman_remote_execution_core.rb,
lib/foreman_remote_execution_core/actions.rb,
lib/foreman_remote_execution_core/version.rb,
lib/foreman_remote_execution_core/script_runner.rb,
lib/foreman_remote_execution_core/fake_script_runner.rb

Defined Under Namespace

Modules: Actions Classes: FakeScriptRunner, ScriptRunner

Constant Summary collapse

VERSION =
'1.0.4'.freeze

Class Method Summary collapse

Class Method Details

.runner_classObject



15
16
17
# File 'lib/foreman_remote_execution_core.rb', line 15

def self.runner_class
  @runner_class ||= simulate? ? FakeScriptRunner : ScriptRunner
end

.simulate?Boolean

Returns:

  • (Boolean)


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

def self.simulate?
  %w(yes true 1).include? ENV.fetch('REX_SIMULATE', '').downcase
end