Can someone tell me what a require => Class actually does? The documentation on this really isn''t clear. The language tutorial at http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial says: "Like resources, you can also create relationships with classes like so: class apache { service { "apache": require => Class["squid"] } } The above uses the require metaparameter to make the apache class dependent on the squid class." What does that mean? Does that mean that the squid class has to be just available, or FULLY implemented and completed before the apache class??? Three days and I am still dicking around with dependancy hell. Doug. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Require => Class will me Sent from my iPhone On 25 Oct 2009, at 06:59, Douglas Garstang <doug.garstang@gmail.com> wrote:> > Can someone tell me what a require => Class actually does? The > documentation on this really isn''t clear. > > The language tutorial at > http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial says: > > "Like resources, you can also create relationships with classes like > so: > > class apache { > service { "apache": require => Class["squid"] } > } > The above uses the require metaparameter to make the apache class > dependent on the squid class." > > What does that mean? Does that mean that the squid class has to be > just available, or FULLY implemented and completed before the apache > class??? > > Three days and I am still dicking around with dependancy hell. > > Doug. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Darn iPhone. Requiring a class will make puppet consider an entire class of resources a dependency. So in the example you quoted, the squid class would be executed before the apache service. It allows abstraction over requiring individual resources, that''s all. Sent from my iPhone On 25 Oct 2009, at 06:59, Douglas Garstang <doug.garstang@gmail.com> wrote:> > Can someone tell me what a require => Class actually does? The > documentation on this really isn''t clear. > > The language tutorial at > http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial says: > > "Like resources, you can also create relationships with classes like > so: > > class apache { > service { "apache": require => Class["squid"] } > } > The above uses the require metaparameter to make the apache class > dependent on the squid class." > > What does that mean? Does that mean that the squid class has to be > just available, or FULLY implemented and completed before the apache > class??? > > Three days and I am still dicking around with dependancy hell. > > Doug. > > >--~--~---------~--~----~------------~-------~--~----~ 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''ve been assuming it''s a typo, and means that the apache *service* depends on the squid class. I''d love to know how to make a class depend on another class. seph Douglas Garstang <doug.garstang@gmail.com> writes:> Can someone tell me what a require => Class actually does? The > documentation on this really isn''t clear. > > The language tutorial at > http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial says: > > "Like resources, you can also create relationships with classes like so: > > class apache { > service { "apache": require => Class["squid"] } > } > The above uses the require metaparameter to make the apache class > dependent on the squid class." > > What does that mean? Does that mean that the squid class has to be > just available, or FULLY implemented and completed before the apache > class??? > > Three days and I am still dicking around with dependancy hell. > > Doug. > >--~--~---------~--~----~------------~-------~--~----~ 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, ----- "seph" <seph@directionless.org> wrote:> I''ve been assuming it''s a typo, and means that the apache *service* > depends on the squid class. I''d love to know how to make a class > depend > on another class.On 0.25.1 and later you can do ''require classname'' instead of ''include classname'' in the cases where you need this, see the function reference and please do note the warning in the documentation about overuse of this feature.> > Douglas Garstang <doug.garstang@gmail.com> writes: > > > Can someone tell me what a require => Class actually does? The > > documentation on this really isn''t clear. > > > > The language tutorial at > > http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial says: > > > > "Like resources, you can also create relationships with classes like > so: > > > > class apache { > > service { "apache": require => Class["squid"] } > > } > > The above uses the require metaparameter to make the apache class > > dependent on the squid class." > > > > What does that mean? Does that mean that the squid class has to be > > just available, or FULLY implemented and completed before the > apache > > class??? > > > > Three days and I am still dicking around with dependancy hell. > > > > Doug. > > > > > >-- R.I.Pienaar --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
seph wrote:> I''ve been assuming it''s a typo, and means that the apache *service* > depends on the squid class. I''d love to know how to make a class depend > on another class. >I use this all the time in 0.24.8. You just put require => Class["whatever"] on your resource in the dependent class. From comments that I''ve seen posted here, I gather that this then means that all items in the dependent class become dependent on the required class though I always explicitly include it on all the resources that really are dependent. -- Trevor Hemsley Infrastructure Engineer ................................................. * C A L Y P S O * 4th Floor, Tower Point, 44 North Road, Brighton, BN1 1YR, UK OFFICE +44 (0) 1273 666 350 FAX +44 (0) 1273 666 351 ................................................. www.calypso.com This electronic-mail might contain confidential information intended only for the use by the entity named. If the reader of this message is not the intended recipient, the reader is hereby notified that any dissemination, distribution or copying is strictly prohibited. * P * /*/ Please consider the environment before printing this e-mail /*/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---