On Fri, Aug 3, 2012 at 8:15 AM, xkrantz <[email protected]> wrote: > Hi every one, > > First, I'm really sorry if this topic has already been discussed over and > over again but it is not so easy to parse and search the web about this, > according to the different versions of puppet. > > > > So, I'm using Puppet 2.6.2 that ships with Debian Squeeze. > (We are not yet ready for puppet 2.7.x). > > > > I'm trying to order classes due to depencies issue and I'am assuming that > ordering is recursive (Every thing in class b won't be done before class a) > > > So I'have tried several syntaxes but in any case, it fails : > > > Syntax 1 > ========= > > class myClass { > > class {'a': > ... > } > -> > class {'b':} > > } > > > Syntax 2 > ========= > > class myClass { > > ## Ordering > Class['a'] -> Class['b'] > > ## Declaring > class {'a': > ... > } > > class {'b':} > > } > > Syntax 3 > ========= > > class myClass { > > class {'a': > ... > } > > ## Use metaparameter > class {'b': > require => Class['a'], > } > > } > > > > In every cases, when the client is applying the catalog, resources / types > from (or included in) class 'b' are realized before these from class 'a'... > > And Yes, I'have checked that none of the resources in class 'b' require one > of class 'a'. > > > > So is it possible ? Do I have to upgrade my Puppet master ?
The syntax is correct, and if your classes only contain resources it should work, otherwise it's a bug. There's a class containment issue and anchors in stdlib have been the way to get around it until some definitive solution comes up. This ticket describes this pretty well with some examples: http://projects.puppetlabs.com/issues/8040 Nan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
