Method: Bolt::Plugin::Module#run_task
- Defined in:
- lib/bolt/plugin/module.rb
#run_task(task, opts) ⇒ Object
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/bolt/plugin/module.rb', line 200 def run_task(task, opts) opts = opts.reject { |key, _val| key.start_with?('_') } params, = process_params(task, opts) params = params.merge() # There are no executor options to pass now. = { catch_errors: true } result = @context.run_local_task(task, params, ).first raise Bolt::Error.new(result.error_hash['msg'], result.error_hash['kind']) unless result.ok result.value end |