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

Instance Method Summary collapse

Methods inherited from Sudoable

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

Methods inherited from Base

#assert_batch_size_one, #batch_command, #batch_connected?, #batch_script, #batch_task, #batch_upload, #batches, #default_input_method, #envify_params, #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

Instance Method Details

#connected?(_targets) ⇒ Boolean

Returns:

  • (Boolean)


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

def connected?(_targets)
  true
end

#provided_featuresObject



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

def provided_features
  ['shell']
end

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

Yields:

  • (conn)


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

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