lib/bolt/outputter/json.rb
# Print target names and where they came from.
#
# @param adhoc [Hash] Adhoc targets provided on the command line.
# @param inventory [Hash] Targets provided from the inventory.
# @param targets [Array] All targets.
# @param count [Integer] Number of targets.
#
Print target names and where they came from.
Print target names and where they came from .
def print_targets(adhoc:, inventory:, targets:, count:, **_kwargs)
        adhoc[:targets]     = adhoc[:targets].map { |t| t['name'] }
        inventory[:targets] = inventory[:targets].map { |t| t['name'] }
        targets             = targets.map { |t| t['name'] }
        @stream.puts({ adhoc: adhoc, inventory: inventory, targets: targets, count: count }.to_json)
      end
def print_targets ( adhoc : , inventory : , targets : , count : , ** _kwargs ) adhoc [ :targets ] = adhoc [ :targets ] . map { | t | t [ 'name' ] } inventory [ :targets ] = inventory [ :targets ] . map { | t | t [ 'name' ] } targets = targets . map { | t | t [ 'name' ] } @stream . puts ( { adhoc : adhoc , inventory : inventory , targets : targets , count : count } . to_json ) end
Print target names and where they came from.
Print target names and where they came from .
adhoc
Adhoc targets provided on the command line.
Adhoc targets provided on the command line .
inventory
Targets provided from the inventory.
Targets provided from the inventory .
targets
None
count
Number of targets.
Number of targets .
_kwargs
<not_specific>