lib/bolt/outputter/json.rb
# Print information about a task.
#
# @param task [Bolt::Task] The task information.
#
Print information about a task.
Print information about a task .
def print_task_info(task:)
        path = task.files.first['path'].chomp("/tasks/#{task.files.first['name']}")
        module_dir = if path.start_with?(Bolt::Config::Modulepath::MODULES_PATH)
                       "built-in module"
                     else
                       path
                     end
        @stream.puts task.to_h.merge(module_dir: module_dir).to_json
      end
def print_task_info ( task : ) path = task . files . first [ 'path' ] . chomp ( "/tasks/#{task.files.first['name']}" ) module_dir = if path . start_with? ( Bolt :: Config :: Modulepath :: MODULES_PATH ) "built-in module" else path end @stream . puts task . to_h . merge ( module_dir : module_dir ) . to_json end
Print information about a task.
Print information about a task .
task
The task information.
The task information .