https://bugzilla.wikimedia.org/show_bug.cgi?id=38524

--- Comment #1 from Antoine "hashar" Musso <[email protected]> 2012-07-20 16:30:05 
UTC ---
The doc at http://projects.puppetlabs.com/projects/puppet/wiki/LDAP_Nodes says
we must add an extension to puppet parser, maybe it is missing when using
puppetmaster::self.

By default the puppetVar LDAP attribute does not support arrays. In order to
support an array with puppetVar you must add these two functions to your
puppetmaster.

/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/get_var.rb:

# Evaluate the value of a variable that might have been defined globally.
module Puppet::Parser::Functions
  newfunction(:get_var, :type => :rvalue) do |args|
    var = args[0]
    global_var = lookupvar(var)
    if global_var != "" and global_var != nil
      case global_var
        when "true"
        return true
        when "false"
        return false
        else
        return global_var
      end
    end
    if args.length > 1
      return args[1]
    end
    return ""
  end
end
/usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/split.rb:

# Split a string variable into an array using the specified split
# character.
#
# Usage:
#
#   $string    = 'value1,value2'
#   $array_var = split($string, ',')
#
# $array_var holds the result ['value1', 'value2']
#
module Puppet::Parser::Functions
  newfunction(:split, :type => :rvalue) do |args|
    return args[0].split(args[1])
  end
end

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to