Issue #5447 has been updated by Damion Alexander.

Similar error in 2.7.6 with a File resource (with the same fix as previous 
update).  

class sudo::config::options {

        define giveall ( $u ) {
                file { "/etc/sudoers.d/$u-all":
                        content => template("sudo/allaccess.erb"),
                        owner => 'root',
                        group => 'root',
                        mode => '440',
                }
        }
}


would fail with:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Duplicate definition: File[/etc/sudoers.d/] is already defined in file 
/etc/puppet/modules/sudo/manifests/config/options.pp at line 10; cannot 
redefine at /etc/puppet/modules/sudo/manifests/config/options.pp:10 on node 

seems anything after a $ is striped before compared.  

Fixed with changing title to "/etc/sudoers.d/${u}-all"
----------------------------------------
Bug #5447: Fix duplicate definition error
https://projects.puppetlabs.com/issues/5447

Author: Matt Robinson
Status: Needs More Information
Priority: Normal
Assignee: Radosław Antoniuk
Category: parser
Target version: 
Affected Puppet version: 2.6.4
Keywords: parameterized_classes
Branch: 


Jos Boumans reported a manifest that results in the following error:

Duplicate definition: Class[Kbase] is already defined; cannot redefine at 
/Users/matthewrobinson/work/puppet/4792:5 on node mattmac.puppetlabs.lan

He thought this was related to ticket 4792 and thus reopened it, but it appears 
to be a separate issue.  He posted his full set of manifests on that ticket, 
but we reduced that to a much smaller manifest that reproduces the problem:
    
<pre>

class { "s_riak": }

class s_riak inherits kbase { }

class { "kbase": }

class kbase { }
</pre>

Note that no external node classification or anything fancy was involved, you 
should be able to reproduce the error on this manifest by simply running it 
through puppet apply.


-- 
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 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-bugs?hl=en.

Reply via email to