Puppet Function: complyadm::bolt_project_inventory_targets

Defined in:
lib/puppet/functions/complyadm/bolt_project_inventory_targets.rb
Function type:
Ruby 4.x API

Overview

complyadm::bolt_project_inventory_targets()Array[Target]

Returns:

  • (Array[Target])


1
2
3
4
5
6
7
8
9
10
# File 'lib/puppet/functions/complyadm/bolt_project_inventory_targets.rb', line 1

Puppet::Functions.create_function(:'complyadm::bolt_project_inventory_targets') do
  dispatch :bolt_project_inventory_targets do
    return_type 'Array[Target]'
  end

  def bolt_project_inventory_targets
    inventory = Puppet.lookup(:bolt_inventory)
    inventory.get_targets(inventory.target_names.to_a)
  end
end