Issue #18109 has been updated by eric sorenson. Status changed from Unreviewed to Needs More Information Assignee set to Chris Spence
Chris -- does 'include test' work as you intend? I.e. is it something in the resource-style class declaration that is doing this, or is it a general namespace problem? If it's the former, I think there are some other related bugs around this that would be good to link up to one another. ---------------------------------------- Bug #18109: Class namespace declaration appears to be dynamically scoped https://projects.puppetlabs.com/issues/18109#change-84074 Author: Chris Spence Status: Needs More Information Priority: Normal Assignee: Chris Spence Category: Target version: Affected Puppet version: 2.7.19 Keywords: Branch: In the example below, the class declaration test generates an error class role::test { class { 'test': } #include test } Duplicate declaration: Class[Role::Test] is already declared; cannot redeclare at /etc/puppetlabs/puppet/modules/role/manifests/test.pp:2 as it appears to be attempting to redeclare itself due to dynamic namespacing in the class { 'test': } declaration. the 'include test' line also doesn't do the 'right thing' because it declares the role::test class, however include ::test does the right thing The workaround is to declare class { '::test': } (or include ::test) , however I wouldn't expect class declaration lookup to be dynamic as a default - I can see that dynamic lookup would cause this to happen, but wonder if this behaviour should be reviewed. -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
