Puppet Function: db2_install::installed_components

Defined in:
lib/puppet/functions/db2_install/installed_components.rb
Function type:
Ruby 4.x API

Overview

db2_install::installed_components(Stdlib::Absolutepath $location1)Array

Create array of selected components based on the selection.

Parameters:

  • location1 (Stdlib::Absolutepath)

Returns:

  • (Array)


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/puppet/functions/db2_install/installed_components.rb', line 6

Puppet::Functions.create_function(:'db2_install::installed_components') do
  #
  # See the file "LICENSE" for the full license governing this code.
  #
  #
  dispatch :installed_components do
    param 'Stdlib::Absolutepath', :location1
    return_type 'Array'
  end

  #
  # return full selection of packages
  #
  def installed_components(location)
    components = closure_scope.to_hash.dig('db2_install_locations', 'installed_components', location)
    components&.collect { |e| e.keys.first } || []
  end
end