On Thu, Jan 15, 2015 at 9:53 AM, jcbollinger <[email protected]> wrote:
>
> In any case, if $foo does not resolve to a class or resource reference, then
> why does catalog building succeed? (Or perhaps the problem actually
> manifests as catalog building failure....)
Feels like I've been staring at the problem too long, forgetting to
provide a little more detail here.
When I have requires = $foo, the catalog does compile and $foo does
resolve to Class['a'] or Class['b'] correctly when I look at the debug
output from the Puppet agent (puppet agent -tv --debug).
If I use the anchor method as well ($foo -> Class['a]), it wasn't
installing it in the preferred order as well, but if I use the anchor
method on the Service Type that Class['a'] provides in its service.pp,
then it worked for me.
>> This should work:
>>
>> $foo = "a"
>>
>> File["/path/to/file"] { require => Class[$foo] }
>>
This method allowed the catalog to compile as well, but didn't change
any of the ordering issues.
Thanks for all of the replies and answers!
Cheers,
--
Jason Wever
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/CAEqBX79m6TN8E%2BT7Ba9%2BvAcGbU8Zwx8%3Dn5Du_vUTm4YXMF6ttg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.