Issue #4792 has been updated by James Turnbull.
Another example from the support ticket:
-sh-3.2# cat service.pp
<pre>
##
## Set up postfix to run.
##
class postfix::service {
service { "postfix":
ensure => "running",
enable => "true",
hasrestart => "true",
hasstatus => "true",
require => Package["postfix"],
}
exec { "newaliases":
require => Package["postfix"],
}
}
</pre>
-sh-3.2# cat init.pp
<pre>
##
## Setup postfix.
##
class postfix {
include postfix::install
include postfix::service
}
##
## Relay class for forwarding only.
##
class postfix::relay inherits postfix::install {
File["/etc/postfix/main.cf"] {
source => "puppet:///modules/postfix/main.cf",
}
file { "/etc/postfix/master.cf":
ensure => present,
source => "puppet:///modules/postfix/master.cf",
require => Package['postfix'],
notify => Service['postfix'],
}
}
</pre>
<pre>
info: Retrieving plugin
info: Loading facts in location
info: Loading facts in rhythmyx
info: Loading facts in apache-ports
info: Loading facts in dell
info: Loading facts in convera
info: Loading facts in location
info: Loading facts in rhythmyx
info: Loading facts in apache-ports
info: Loading facts in dell
info: Loading facts in convera
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Duplicate definition: Package[postfix] is already defined in file
/etc/puppet/modules/production/postfix/manifests/install.pp at line 9; cannot
redefine at /etc/puppet/modules/production/postfix/manifests/install.pp:9 on
node hlsrelay1.law.harvard.edu
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
</pre>
----------------------------------------
Bug #4792: Duplicate definition since 2.6.1 upgrade
http://projects.puppetlabs.com/issues/4792
Author: James Turnbull
Status: Needs more information
Priority: High
Assignee: James Turnbull
Category: parser
Target version: 2.6.2
Affected version: 2.6.1
Keywords:
Branch:
Class, users::virtual which has all the user{} statements for all users. Then
have classes like users::cms and users::developers that inherit users::virtual
and then realize some of the users. This all worked perfectly fine in 2.5 but
since 2.6.1 runs now fail with:
<pre>
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Duplicate definition: User[apen
ney] is already defined in file
/etc/puppet/modules/testing/users/manifests/virtual.pp at line 19; canno
t redefine at /etc/puppet/modules/testing/users/manifests/virtual.pp:19 on node
hlslinutil1.law.harvard.
edu
</pre>
<pre>
realize(
User['user'],
)
}
# cat virtual.pp
class users::virtual {
##
## Sysadmins
##
@user { "user":
ensure => "present",
uid => 35421,
gid => 100,
groups => "wheel",
comment => "User Name",
home => "/home/user",
shell => "/bin/zsh",
password => password,
managehome => true,
}
}
</pre>
--
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.