That is very interesting insight, indeed I was confusing resource ordering with parsing order although none of the proposed solutions worked for me, anyway, thanks for making a good point!
On Thursday, 24 January 2013 20:43:32 UTC, jcbollinger wrote: > > > > On Thursday, January 24, 2013 9:20:23 AM UTC-6, MCZ wrote: >> >> Its puppet 2.7.x latest, I chain resources like this: >> >> node 'puppetmaster-client' { >> include base::route53::r53server >> $primary_fqdn = 'puppetmaster.foo.bar' >> base::route53::r53delegation { >> ["$primary_fqdn.",'xyz.foo.bar.']: } ->Class['base::route53::r53server'] >> } >> >> > I really don't see the advantage of using the chain operator in that > case. I would write this, instead: > > base::route53::r53delegation { ["$primary_fqdn.",'xyz.foo.bar.']: > require => Class['base::route53::r53server'] > } > > It means the same thing, but it's clearer (to me) and exposes a smaller > cross-section for bugs. > > Nevertheless, I don't think that's related to your problem. Having looked > at your failure case, I suspect you have a parse-order issue. Moreover, I > suspect that you are confusing order of resource application with parse > order: only the former is affected by resource relationships, so I don't > think the chain operator is doing what you expected. I think moving the > declaration of class base::route53::r53server after that of the > base::route53::r53delegation declarations will solve the problem by > ensuring that the delegations are parsed (and their Dnsrecord resources > exported) before the server class is parsed (and at that time collects the > resources): > > node 'puppetmaster-client' { > $primary_fqdn = 'puppetmaster.foo.bar' > base::route53::r53delegation { ["$primary_fqdn.",'xyz.foo.bar.']: > } > include 'base::route53::r53server' > # If you really do need chaining then put it here: > } > > > John > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.