Kim Gert Nielsen wrote: > Hi, > > I'm trying to add libapache2-mod-php5 as a dependency in my php5 module here > is what I get > > info: Loading facts in raidcontroller > info: Loading facts in raidcontroller > debug: Format s not supported for Puppet::Resource::Catalog; has not > implemented method 'from_s' > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Duplicate definition: Package[libapache2-mod-php5] is already defined in file > /etc/puppet/modules/php5/manifests/init.pp at line 18; cannot redefine at > /etc/puppet/modules/php5/manifests/init.pp:18 on node webserver1.example.com > warning: Not using cache on failed catalog > err: Could not retrieve catalog; skipping run > > I do not have defined Package[libapache2-mod-php5] anywhere else in any file > (According to grep -ir) > define enablemodule($ensure='present') { > > package { ['libapache2-mod-php5']: ensure => installed } > > case $ensure { > present: { > package { [$name]: ensure => installed } > } > } > }
If you use this define twice, eg "enablemodule{[a,b]:}", then the Package[libapache2-mod-php5] will be defined twice and the compilation will fail with the error you're using. to solve this, create a little class containing this package and include the class instead of defining the resource directly. Regards, DavidS -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.