/[adm]/puppet/modules/mga_common/lib/puppet/parser/functions/hash_merge.rb
ViewVC logotype

Contents of /puppet/modules/mga_common/lib/puppet/parser/functions/hash_merge.rb

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3254 - (show annotations) (download)
Wed Jun 19 19:15:59 2013 UTC (10 years, 10 months ago) by boklm
File size: 281 byte(s)
Rename mga-common module to mga_common.

New puppet version doesn't like modules with a - in their name.
1 module Puppet::Parser::Functions
2 newfunction(:hash_merge, :type => :rvalue) do |args|
3 unless args[0].is_a?(Hash) and args[1].is_a?(Hash)
4 Puppet.warning "hash_merge takes two arguments"
5 nil
6 else
7 print "hash_merge\n"
8 args[0].merge(args[1])
9 end
10 end
11 end

  ViewVC Help
Powered by ViewVC 1.1.30