On 04.02.2011 06:59, Nick Lewis wrote:
$name can now be used to set default values in defined resource types
Feature #5061: should be able to access ($name, $module_name, $title)
from within defined resources type parameter list
The $name variable is now resolved within the scope of the resource
being declared, rather than the enclosing scope.
This sentence about scopes doesn't parse for my brain. You might as well
remove it, since the intro and example describe the feature rather well
imho.
This enables usages like:
define audited_file($filename = $name) {
file { $filename:
audit => all,
}
}
audited_file { "/etc/hosts": }
Best Regards, David
--
dasz.at OG Tel: +43 (0)664 2602670 Web: http://dasz.at
Klosterneuburg UID: ATU64260999
FB-Nr.: FN 309285 g FB-Gericht: LG Korneuburg
--
You received this message because you are subscribed to the Google Groups "Puppet
Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.