Puppet Function: falcon::win_install_options
- Defined in:
- lib/puppet/functions/falcon/win_install_options.rb
- Function type:
- Ruby 4.x API
Overview
Helper function to generate install options for falcon on windows machines
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/puppet/functions/falcon/win_install_options.rb', line 2 Puppet::Functions.create_function(:"falcon::win_install_options") do # @param options install options for falcon to be parsed # @return [Hash] transformed install options for falcon # @example Calling the function # falcon::win_install_options({ 'CID' => 'SDLFK1123JKLFAL}) # # @api private # dispatch :win_install_options do param 'Hash', :options return_type 'Array' end def () # convert PROXYDISABLE value to the appropriate value for falcon # we use the inverse so if the user sets proxy_enabled to false, we set PROXYDISABLE to 1 # if the user sets proxy_enabled to true, we remove the PROXYDISABLE key = .dup if .key?('PROXYDISABLE') unless ['PROXYDISABLE'].nil? ['PROXYDISABLE'] = ['PROXYDISABLE'] ? nil : 1 end end .compact.map { |k, v| "#{k}=#{v}" } end end |