On Thu, Aug 11, 2011 at 09:23:51AM -0700, Aaron Grewell wrote: > I think you'll have to do it at the class level with the arrow operators > rather than at the resource level. I haven't ever done that, but I think if > the manifest contains something like: > > class { 'mod2::class2': } > class { 'mod1::class1': message => 'Hallo Welt'} > mod1 -> mod2 > > you may have better luck.
Nope. Neither does class { 'mod2::class2': require => Class['mod1::class1']} class { 'mod1::class1': message => 'Hallo Welt'} nor does class { 'mod2::class2': require => Class['mod2::class2']} class { 'mod1::class1': message => 'Hallo Welt'} Class['mod1::class1'] -> Class['mod2::class2'] work. So you basically run into the same issues as when you use the defined function to check for other classes inside a class: It all depends on the parsing order. At least I get a warning if the order in my manifest is wrong: warning: Scope(Class[Mod2::Class2]): Could not look up qualified variable 'mod1::class1::message'; class mod1::class1 has not been evaluated at /tmp/modules/mod2/manifests/class2.pp:2 but unfortunately puppet does not fail hard here but just applies a catalog with some empty variables which in my opinion is just wrong. -Stefan
pgp4mciTMLpfS.pgp
Description: PGP signature