2012/2/7 Jan Ivar Beddari <jan.ivar.bedd...@uib.no>: > On 02/07/2012 03:54 PM, jimbob palmer wrote: >>> >>> >>> # The right way >>> class foo::specific { >>> include 'foo::common' >>> # specific stuff >>> } >> >> >> So can I be sure that the include will run first, before the "specific >> stuff" here? > > > Kind of, but you need to change your thinking. The include does not _run_ > before the specific stuff, it _declares_ foo::common. The result is not a > sequential run of something, but a graph - a catalog of resources and > relationships :)
Yikes so how can I be sure that the included stuff gets included before I need it? Say it pulls in some variables and package requirements. And a related question: if I have a case statement at the top of my class that sets a variable, how can I be sure the variable will be set before I need it lower down in the same class? > > >> Okay. So if I am not meant to use class inheritance for this, when >> should I use it? > > > Hm, I'm tempted to say "never" but this is an example use > > http://docs.puppetlabs.com/guides/parameterized_classes.html#appendix-smart-parameter-defaults > > > -- > http://www.uib.no/personer/Jan.Ivar.Beddari > > > -- > 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.