Class: Bolt::Transport::Local

Inherits:
Sudoable show all
Defined in:
lib/bolt/transport/local.rb,
lib/bolt/transport/local/shell.rb

Defined Under Namespace

Classes: Shell

Constant Summary

Constants inherited from Base

Base::ENVIRONMENT_METHODS, Base::STDIN_METHODS

Instance Attribute Summary

Attributes inherited from Base

#logger

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Sudoable

#make_wrapper_stringio, #run_command, #run_script, #run_task, sudo_prompt, #upload, validate_sudo_options

Methods inherited from Base

#assert_batch_size_one, #batch_command, #batch_connected?, #batch_script, #batch_task, #batch_upload, #batches, #default_input_method, default_options, #envify_params, filter_options, #initialize, #run_command, #run_script, #run_task, #select_implementation, #select_interpreter, #unwrap_sensitive_args, #upload, #with_events

Constructor Details

This class inherits a constructor from Bolt::Transport::Base

Class Method Details

.optionsObject



6
7
8
# File 'lib/bolt/transport/local.rb', line 6

def self.options
  %w[tmpdir interpreters sudo-password run-as run-as-command sudo-executable]
end

.validate(options) ⇒ Object



14
15
16
# File 'lib/bolt/transport/local.rb', line 14

def self.validate(options)
  validate_sudo_options(options)
end

Instance Method Details

#connected?(_targets) ⇒ Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/bolt/transport/local.rb', line 23

def connected?(_targets)
  true
end

#provided_featuresObject



10
11
12
# File 'lib/bolt/transport/local.rb', line 10

def provided_features
  ['shell']
end

#with_connection(target, *_args) {|conn| ... } ⇒ Object

Yields:

  • (conn)


18
19
20
21
# File 'lib/bolt/transport/local.rb', line 18

def with_connection(target, *_args)
  conn = Shell.new(target)
  yield conn
end