I''m building a puppet manifest for an Ubuntu machine that needs to have both of these on it: package { "memcached": provider => gem, ensure => "0.18.0" } package { "memcached": provider => apt, ensure => installed } This fails with the following error: err: Could not retrieve catalog: Puppet::Parser::AST::Resource failed with error ArgumentError: Duplicate definition: Package[memcached] is already defined in file /etc/puppet/manifests/site.pp at line 313; cannot redefine at /etc/puppet/manifests/site.pp:221 on node mynode How do I get around this? thanks! Hernan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Patrick Mohr
2010-Jul-02 05:16 UTC
Re: [Puppet Users] apt and gem package with the same name
On Jun 30, 2010, at 5:02 PM, hernan wrote:> I''m building a puppet manifest for an Ubuntu machine that needs to > have both of these on it: > > package { "memcached": > provider => gem, > ensure => "0.18.0" > } > > package { "memcached": > provider => apt, > ensure => installed > } > > This fails with the following error: > > err: Could not retrieve catalog: Puppet::Parser::AST::Resource failed > with error ArgumentError: Duplicate definition: Package[memcached] is > already defined in file /etc/puppet/manifests/site.pp at line 313; > cannot redefine at /etc/puppet/manifests/site.pp:221 on node mynode > > How do I get around this?There was a recent message about this. The conclusion was, if you are using 0.25.x or earlier, the only option is to use "exec" for one of them. I don''t remember if the unreleased new version in the repository addresses this. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Darren Chamberlain
2010-Jul-02 16:24 UTC
Re: [Puppet Users] apt and gem package with the same name
* hernan <hernan.silberman at gmail.com> [2010/06/30 17:02]:> I''m building a puppet manifest for an Ubuntu machine that needs to > have both of these on it: > > package { "memcached": > provider => gem, > ensure => "0.18.0" > } > > package { "memcached": > provider => apt, > ensure => installed > }I think this should work: package { "memcached-gem": name => "memcached", provider => gem, ensure => "0.18.0" } package { "memcached-apt": name => "memcached", provider => apt, ensure => installed } -- Time passes, but love remains. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Gustavo Soares
2010-Jul-07 13:12 UTC
Re: [Puppet Users] apt and gem package with the same name
I don''t think that it should work. I have a similar a problem when I want to manage to gems with different versions.. I have tried something like this: package { "memcached-0.18.0": name => "memcached", provider => gem, ensure => "0.18.0" } package { "memcached-0.20.0": name => "memcached", provider => gem, ensure => "0.20.0" } and it didn''t work :( Cheers, Gus On Fri, Jul 2, 2010 at 1:24 PM, Darren Chamberlain <darren@boston.com>wrote:> * hernan <hernan.silberman at gmail.com> [2010/06/30 17:02]: > > I''m building a puppet manifest for an Ubuntu machine that needs to > > have both of these on it: > > > > package { "memcached": > > provider => gem, > > ensure => "0.18.0" > > } > > > > package { "memcached": > > provider => apt, > > ensure => installed > > } > > I think this should work: > > package { "memcached-gem": > name => "memcached", > provider => gem, > ensure => "0.18.0" > } > > package { "memcached-apt": > name => "memcached", > provider => apt, > ensure => installed > } > > -- > Time passes, but love remains. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
I have tried this solution as well and it did not work. I may resort to an exec as Patrick suggested. thnx.. Hernan On Wed, Jul 7, 2010 at 6:12 AM, Gustavo Soares <gustavosoares@gmail.com> wrote:> I don''t think that it should work. > I have a similar a problem when I want to manage to gems with different > versions.. I have tried something like this: > package { "memcached-0.18.0": > name => "memcached", > provider => gem, > ensure => "0.18.0" > } > package { "memcached-0.20.0": > name => "memcached", > provider => gem, > ensure => "0.20.0" > } > > and it didn''t work :( > Cheers, > Gus > On Fri, Jul 2, 2010 at 1:24 PM, Darren Chamberlain <darren@boston.com> > wrote: >> >> * hernan <hernan.silberman at gmail.com> [2010/06/30 17:02]: >> > I''m building a puppet manifest for an Ubuntu machine that needs to >> > have both of these on it: >> > >> > package { "memcached": >> > provider => gem, >> > ensure => "0.18.0" >> > } >> > >> > package { "memcached": >> > provider => apt, >> > ensure => installed >> > } >> >> I think this should work: >> >> package { "memcached-gem": >> name => "memcached", >> provider => gem, >> ensure => "0.18.0" >> } >> >> package { "memcached-apt": >> name => "memcached", >> provider => apt, >> ensure => installed >> } >> >> -- >> Time passes, but love remains. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To post to this group, send email to puppet-users@googlegroups.com. >> To unsubscribe from this group, send email to >> puppet-users+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Peter Meier
2010-Jul-08 02:09 UTC
Re: [Puppet Users] apt and gem package with the same name
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/07/2010 07:10 PM, hernan wrote:> I have tried this solution as well and it did not work. I may resort > to an exec as Patrick suggested.it will work when we have composite primary keys for resources, I''m not sure we will get that in 2.6, but there are definately plans for it. cheers pete -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkw1M28ACgkQbwltcAfKi39wAgCdHisimki0ojpShkeP1r6jsbGs 0ZQAnjbTAC6MamtMqxEnN5ILQPljSXZX =IX2d -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
James Turnbull
2010-Jul-08 02:44 UTC
Re: [Puppet Users] apt and gem package with the same name
Peter Meier wrote:> On 07/07/2010 07:10 PM, hernan wrote: >> I have tried this solution as well and it did not work. I may resort >> to an exec as Patrick suggested. > > it will work when we have composite primary keys for resources, I''m not > sure we will get that in 2.6, but there are definately plans for it.The composite primary keys "backend" will go into 2.6. Types and providers will need to be changed to take advantage of it. Regards James -- Puppet Labs - http://www.puppetlabs.com C: 503-734-8571 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
David Schmitt
2010-Jul-09 07:27 UTC
Re: [Puppet Users] apt and gem package with the same name
On 7/8/2010 4:09 AM, Peter Meier wrote:> On 07/07/2010 07:10 PM, hernan wrote: >> I have tried this solution as well and it did not work. I may resort >> to an exec as Patrick suggested. > > it will work when we have composite primary keys for resources, I''m not > sure we will get that in 2.6, but there are definately plans for it.#1621 has the core commit. Improvements are still queued. Best Regards, David -- dasz.at OG Tel: +43 (0)664 2602670 Web: http://dasz.at Klosterneuburg UID: ATU64260999 FB-Nr.: FN 309285 g FB-Gericht: LG Korneuburg -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Peter Meier
2010-Jul-09 16:00 UTC
Re: [Puppet Users] apt and gem package with the same name
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1>>> I have tried this solution as well and it did not work. I may resort >>> to an exec as Patrick suggested. >> >> it will work when we have composite primary keys for resources, I''m not >> sure we will get that in 2.6, but there are definately plans for it. > > #1621 has the core commit. Improvements are still queued.awesome! cheers pete -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkw3R5QACgkQbwltcAfKi38qlQCaA0uaVclUHgaBzMawRxpJEWut cGEAn1KgxMxErdWUyDnwkFmgDy1B4b4K =33Yt -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Ricky Ticky
2010-Dec-08 16:04 UTC
Re: [Puppet Users] apt and gem package with the same name
Was this resolved? I''m using 2.6.4 and still can''t declare packages with the same package name: package { legacy_chunk: name => ''facter'', provider => ''rpm'', ensure => absent, } package { gem_chunk: name => ''facter'', provider => ''gem'', ensure => latest } Thank you. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.