Puppet Function: windows_msi_installargs
- Defined in:
-
lib/puppet/parser/functions/windows_msi_installargs.rb
- Function type:
- Ruby 3.x API
Overview
windows_msi_installargs() ⇒ String
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/puppet/parser/functions/windows_msi_installargs.rb', line 2
newfunction(:windows_msi_installargs, arity: 1, type: :rvalue, doc: <<-EOS
@return [String] Return the $install_options parameter as a string usable in an msiexec command
EOS
) do |args|
install_args = args[0]
arg_string = install_args.map do |option|
if option.class == Hash
key_value = option.shift
"#{key_value[0]}=\"#{key_value[1]}\""
else
option
end
end
return arg_string.join(' ').gsub('"', '"""')
end
|