If your role class declares other classes you probably being bitten by http://projects.puppetlabs.com/issues/8040. That is, and classes declared in the role class are not confined by the dependency graph. It's something they're working on fixing, but in the meantime, the recomendation is to use the anchor pattern. http://projects.puppetlabs.com/projects/puppet/wiki/Anchor_Pattern. The achor resource type comes from the stdlib, IIRC.
On Wednesday, March 27, 2013 11:07:04 AM UTC-7, blalor wrote: > > I'm using Puppet 3.1.1 in standalone mode. I'm running "puppet apply" > like this: > > basedir="$( dirname $( readlink -f "${0}" ) )" > puppet apply \ > --detailed-exitcodes \ > --modulepath=${basedir}/modules \ > --hiera_config=${basedir}/hiera.yaml \ > ${basedir}/manifests/site.pp > > site.pp looks like this (verbatim): > > node default { > include "role::${::nibiru_app_name}" > > if $nibiru_region != 'vagrant' { > include dns_workarounds > > Class['dns_workarounds'] -> > Class["role::${::nibiru_app_name}"] > } > > } > > modules/dns_workarounds/manifests/init.pp is similar to this: > > class dns_workarounds { > host {'b3-proj-dev-03.example.com': ip => '10.1.128.18'} > host {'b3-proj-dev-04.example.com': ip => '10.1.128.19'} > host {'b3-proj-dev-05.example.com': ip => '10.1.128.20'} > > } > > nibiru_app_name comes from facter. The dns_workarounds class is just a > bunch of host resource definitions that I have to add before everything > else runs, due to some wonky DNS. I'm able to get a successful Puppet run, > but I'm finding that not all of the host resources defined in > dns_workarounds are being processed before the role is processed. I see > the following on stdout: > > Notice: > /Stage[main]/Dns_workarounds/Host[b3-proj-dev-05.example.com]/ensure: > created > Notice: /Stage[main]/Role::Base/Package[python-pip]/ensure: ensure > changed 'purged' to 'present' > Notice: /Stage[main]/Dns_workarounds/Host[login.dev.example.com]/ensure: > created > > So far I haven't had a problem with the puppet apply failing due to the > out-of-order resource processing, but I'm sure it'll bite me eventually. > Am I declaring the ordering correctly with -> ? I also tried just using > "require dns_workarounds" in the if block, but that's giving me the same > result. > > Thanks, > Brian > > -- > Brian Lalor > bla...@bravo5.org <javascript:> > > > -- 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.