Puppet Function: pg_config::on_instance
- Defined in:
- lib/puppet/functions/pg_config/on_instance.rb
- Function type:
- Ruby 4.x API
Overview
See the file “LICENSE” for the full license governing this code.
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/puppet/functions/pg_config/on_instance.rb', line 6 Puppet::Functions.create_function('pg_config::on_instance') do dispatch :on_instance do param 'Variant[Array, Undef]', :values param 'String', :select_instance end def on_instance(values, select_instance) return [] if values.nil? values.collect { |e| e['instance'] == select_instance ? e['name'] : nil }.compact end end |