1
0
mirror of https://github.com/krislamo/puppet-rsnapshot synced 2025-09-07 13:59:28 +00:00

working prototype (config generation)

This commit is contained in:
Norbert Varzariu
2015-12-19 11:16:05 +01:00
commit 234c5935a6
21 changed files with 781 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
module Puppet::Parser::Functions
newfunction(:pick_undef, :type => :rvalue, :doc => <<-EOS
This function is similar to pick_default, but will return or undefined values.
EOS
) do |args|
fail "Must receive at least one argument." if args.empty?
default = args.last
args = args[0..-2].compact
# args.delete(:undef)
# args.delete(:undefined)
# args.delete("")
args << default
return args[0]
end
end