From df7e540f6ad7385badb91e385e79a583789f3649 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Wed, 19 Jun 2013 19:15:59 +0000 Subject: Rename mga-common module to mga_common. New puppet version doesn't like modules with a - in their name. --- .../mga-common/lib/puppet/parser/functions/group_members.rb | 10 ---------- modules/mga-common/lib/puppet/parser/functions/hash_keys.rb | 10 ---------- modules/mga-common/lib/puppet/parser/functions/hash_merge.rb | 11 ----------- modules/mga-common/lib/puppet/parser/functions/str_join.rb | 11 ----------- 4 files changed, 42 deletions(-) delete mode 100644 modules/mga-common/lib/puppet/parser/functions/group_members.rb delete mode 100644 modules/mga-common/lib/puppet/parser/functions/hash_keys.rb delete mode 100644 modules/mga-common/lib/puppet/parser/functions/hash_merge.rb delete mode 100644 modules/mga-common/lib/puppet/parser/functions/str_join.rb (limited to 'modules/mga-common/lib') diff --git a/modules/mga-common/lib/puppet/parser/functions/group_members.rb b/modules/mga-common/lib/puppet/parser/functions/group_members.rb deleted file mode 100644 index c5cecbe8..00000000 --- a/modules/mga-common/lib/puppet/parser/functions/group_members.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'etc' -# group_members($group) -# -> return a array with the login of the group members - -module Puppet::Parser::Functions - newfunction(:group_members, :type => :rvalue) do |args| - group = args[0] - return Etc.getgrnam(group).mem - end -end diff --git a/modules/mga-common/lib/puppet/parser/functions/hash_keys.rb b/modules/mga-common/lib/puppet/parser/functions/hash_keys.rb deleted file mode 100644 index 3a926bee..00000000 --- a/modules/mga-common/lib/puppet/parser/functions/hash_keys.rb +++ /dev/null @@ -1,10 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:hash_keys, :type => :rvalue) do |args| - unless args[0].is_a?(Hash) - Puppet.warning "hash_keys takes one argument, the input hash" - nil - else - args[0].keys - end - end -end diff --git a/modules/mga-common/lib/puppet/parser/functions/hash_merge.rb b/modules/mga-common/lib/puppet/parser/functions/hash_merge.rb deleted file mode 100644 index 375bffa4..00000000 --- a/modules/mga-common/lib/puppet/parser/functions/hash_merge.rb +++ /dev/null @@ -1,11 +0,0 @@ -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 diff --git a/modules/mga-common/lib/puppet/parser/functions/str_join.rb b/modules/mga-common/lib/puppet/parser/functions/str_join.rb deleted file mode 100644 index de97bfb5..00000000 --- a/modules/mga-common/lib/puppet/parser/functions/str_join.rb +++ /dev/null @@ -1,11 +0,0 @@ -# str_join($array, $sep) -# -> return a string created by converting each element of the array to -# a string, separated by $sep - -module Puppet::Parser::Functions - newfunction(:str_join, :type => :rvalue) do |args| - array = args[0] - sep = args[1] - return array.join(sep) - end -end -- cgit v1.2.1