Issue #21441 has been updated by Alexander Fortin. Status changed from Investigating to Accepted Affected Puppet version changed from 3.1.1 to 3.2.2
---------------------------------------- Bug #21441: Resource defaults for class-local define requires fully qualified name https://projects.puppetlabs.com/issues/21441#change-94537 * Author: Thomas Bellman * Status: Accepted * Priority: Low * Assignee: * Category: * Target version: * Affected Puppet version: 3.2.2 * Keywords: * Branch: ---------------------------------------- If I have a defined resource type inside a class, I can refer to that using just the unqualified name. But not for setting defaults for that defined type. Here is a simple manifest showing the problem: <pre> class foo { define bar($message, $withpath) { notify { $name: message => $message, withpath => $withpath; } } Bar { withpath => true } bar { 1: message => 'Message 1'; } } node default { include foo } </pre> Running this gives: <pre> $ puppet apply /tmp/test.pp Must pass withpath to Foo::Bar[1] at /tmp/test.pp:3 on node jolokia </pre> If i change line 8 to <pre> Foo::Bar { withpath => true } </pre> it works as I expect it to. Not a high priority bug, as there is a simple workaround, but it took me some time to figure out what was happening... I have only tested this against 2.7.22 and 2.6.18 (I found it when I updated from 2.6.18 to 2.7.22 and started to try to exterminate warnings about dynamic scoping). -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
