Puppet Function: ucp_uninstall_flags
- Defined in:
-
lib/puppet/parser/functions/ucp_uninstall_flags.rb
- Function type:
- Ruby 3.x API
Overview
ucp_uninstall_flags() ⇒ Any
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/puppet/parser/functions/ucp_uninstall_flags.rb', line 2
newfunction(:ucp_uninstall_flags, :type => :rvalue) do |args|
opts = args[0] || {}
flags = []
if opts['preserve_certs_on_delete']
flags << '--preserve-certs'
end
if opts['preserve_images_on_delete']
flags << '--preserve-images'
end
if opts['ucp_id'] && opts['ucp_id'].to_s != 'undef'
flags << "--id '#{opts['ucp_id']}'"
end
opts['extra_parameters'].each do |param|
flags << param
end
flags.flatten.join(" ")
end
|