Hello, I was trying to define some packages virtually since they could be in multiple classes. Yet I get an error about it beging defined twice: @package { "munin-node": ensure => installed } realize(Package[munin-node]) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Nov 12, 2008, at 6:19 AM, gary wrote:> > Hello, > > I was trying to define some packages virtually since they could be in > multiple classes. Yet I get an error about it beging defined twice: > > @package { "munin-node": ensure => installed } > realize(Package[munin-node])I would normally extract this into a separate class, rather than using virtual resources (for this case), but... Is there a question here? -- Hollywood is a place where they''ll pay you a thousand dollars for a kiss and fifty cents for your soul. -- Marilyn Monroe --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hello Luke, I could separate it into a distinct class. the munin-node wasn''t exactly a good example. Like java for instance is needed for various things; I could create a class and may eventually do that. But there''s quite a few examples and maybe a module is the only way. My question was should a virtual package work? :) On Nov 13, 8:34 am, Luke Kanies <l...@madstop.com> wrote:> On Nov 12, 2008, at 6:19 AM, gary wrote: > > > > > Hello, > > > I was trying to define some packages virtually since they could be in > > multiple classes. Yet I get an error about it beging defined twice: > > > @package { "munin-node": ensure => installed } > > realize(Package[munin-node]) > > I would normally extract this into a separate class, rather than using > virtual resources (for this case), but... Is there a question here? > > -- > Hollywood is a place where they''ll pay you a thousand dollars for a > kiss and fifty cents for your soul. -- Marilyn Monroe > --------------------------------------------------------------------- > Luke Kanies |http://reductivelabs.com|http://madstop.com--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
2008/11/12 gary <garyyuen@gmail.com>> > Hello Luke, > > I could separate it into a distinct class. the munin-node wasn''t > exactly a good example. Like java for instance is needed for various > things; I could create a class and may eventually do that. But there''s > quite a few examples and maybe a module is the only way. > > My question was should a virtual package work? :) > > > > > @package { "munin-node": ensure => installed } > > > realize(Package[munin-node]) > > >They do, you just cannot define them more than once, like any oher resource. eg: class packages { @package {"example": ensure => installed } } class test1 { include packages realize(Package[example]) } class test2 { include packages realize(Package[example]) } .r'' --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Got it. thanks :) On Nov 13, 11:23 am, RijilV <rij...@riji.lv> wrote:> 2008/11/12 gary <garyy...@gmail.com> > > > > > Hello Luke, > > > I could separate it into a distinct class. the munin-node wasn''t > > exactly a good example. Like java for instance is needed for various > > things; I could create a class and may eventually do that. But there''s > > quite a few examples and maybe a module is the only way. > > > My question was should a virtual package work? :) > > > > > @package { "munin-node": ensure => installed } > > > > realize(Package[munin-node]) > > They do, you just cannot define them more than once, like any oher > resource. eg: > > class packages { > @package {"example": ensure => installed } > > } > > class test1 { > include packages > realize(Package[example]) > > } > > class test2 { > include packages > realize(Package[example]) > > } > > .r''--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---