diff options
-rw-r--r-- | modules/mga-common/lib/puppet/parser/functions/hash_merge.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/mga-common/lib/puppet/parser/functions/hash_merge.rb b/modules/mga-common/lib/puppet/parser/functions/hash_merge.rb new file mode 100644 index 00000000..375bffa4 --- /dev/null +++ b/modules/mga-common/lib/puppet/parser/functions/hash_merge.rb @@ -0,0 +1,11 @@ +module Puppet::Parser::Functions + newfunction(:hash_merge, :type => :rvalue) do |args| + unless args[0].is_a?(Hash) and args[1].is_a?(Hash) + Puppet.warning "hash_merge takes two arguments" + nil + else + print "hash_merge\n" + args[0].merge(args[1]) + end + end +end |