[Puppet Users] extlookup in 2.6.1 defaults

Douglas Garstang
2010-08-22T06:42:43Z

Hmmm....

So I was just trying the extlookup function that comes with puppet
2.6.1. It now lets you do this:

$version = extlookup("rsyslog_version", "present",
"packages")

which, according to the documentation:

# This will look for a version configured in packages.csv and then in
the rest as configured
# by $extlookup_precedence if it''s not found anywhere it will default
to "present", this kind
# of use case makes puppet a lot nicer for managing large amounts of
packages since you do not
# need to edit a load of manifests to do simple things like adjust a
desired version number.

This seems a bit weird to me. The second parameter isn''t optional (I
think the 2nd and 3rd parameters should be switched), which means that
you MUST have a default value in there, which means, you might as well
use the same value as in the file, which means the file is somewhat
redundant. Anyone else see that?