Class: Bolt::Transport::Local
- Defined in:
- lib/bolt/transport/local.rb,
lib/bolt/transport/local/connection.rb
Defined Under Namespace
Classes: Connection
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Simple
#download, #run_command, #run_script, #run_task, #upload
Methods inherited from Base
#assert_batch_size_one, #batch_command, #batch_connected?, #batch_download, #batch_script, #batch_task, #batch_task_with, #batch_upload, #batches, #default_input_method, #download, #envify_params, #initialize, #provided_features, #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?(_target) ⇒ Boolean
9 10 11 |
# File 'lib/bolt/transport/local.rb', line 9 def connected?(_target) true end |
#with_connection(target) {|Connection.new(target)| ... } ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/bolt/transport/local.rb', line 13 def with_connection(target) if target.transport_config['bundled-ruby'] || target.name == 'localhost' target.set_local_defaults end if target.name != 'localhost' && !target.transport_config.key?('bundled-ruby') msg = "The local transport will default to using Bolt's Ruby interpreter and "\ "setting the 'puppet-agent' feature in Bolt 3.0. Enable or disable these "\ "defaults by setting 'bundled-ruby' in the local transport config." Bolt::Logger.warn_once("local_default_config", msg) end yield Connection.new(target) end |