Thanks John ,  I wasn't aware of that distinction.  I suspect you've saved
me a forehead=>wall session on down the road. :-)
On Aug 11, 2011 2:31 PM, "jcbollinger" <john.bollin...@stjude.org> wrote:
>
>
> On Aug 11, 10:54 am, Stefan Schulte <stefan.schu...@taunusstein.net>
> wrote:
>> On Thu, Aug 11, 2011 at 08:30:37AM -0700, Aaron Grewell wrote:
>> > It's fine, just make sure class2 requires class1.  That's what requires
are
>> > for.
>>
>> Unfortunately it still doesnt worked. Changed class2 to
>>
>>     class mod2::class2 {
>>       file { $mod1::class1::message:
>>         ensure  => file,
>>         require => Class['mod1::class1'],
>>       }
>>     }
>>
>> Manifest is still
>>
>>     class { 'mod2::class2': }
>>     class { 'mod1::class1': message => 'Hallo Welt'}
>>
>> What I get is
>>
>> 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
>
>
> I must say I'm not surprised that one didn't work. Indeed, I would
> have been surprised if it had. The require is inside a scope defined
> by the variable in question, and that scope can't be defined in the
> first place.
>
> I think I know what's going on. Basically, 'require' and its friends
> are the the wrong tool for the job: they establish order relationships
> for determining the order in which resources are *applied* by the
> agent, but they not necessarily the order in which resources are
> evaluated during catalog compilation by the master.
>
> Were class1 not parameterized, I would recommend that class2 simply
> 'include' it, and I am confident that would make it all good. But you
> cannot do that with a parameterized class (as far as I am aware), so I
> think that leaves you up a creek.
>
>
> John
> Parameterized Classes -- Finding new ways to break your manifests
> since 2010!
>
> --
> 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.

Reply via email to