Re: [Puppet Users] Re: Requiring defines from other classes in a fact

2012-04-17 Thread Boudewijn Ector
On 04/17/2012 07:14 AM, Wil Cooley wrote:
> On Apr 16, 2:39 pm, Boudewijn Ector 
> wrote:
>
>> Very very simple, except for the fact that I want to add the
>> dependency for the mysql::database too. I'm using this excellent
>> module for managing mysql:https://github.com/camptocamp/puppet-mysql
>>
>> Is there a neat way to do something like this
>>
>>   service{"openca":
>>...
>>requires => [Package["openca"],mysql::database["openca"]],
>>   }
>>
>> I already tried doing this, and also tried dependency chaining, but
>> just can't get it to work at all.
> You've almost got it here; you need to use reference syntax for the
> mysql::database resource just like you do for the package:
>
> requires => [Package["openca"],Mysql::Database["openca"]],
>
> Wil
>
Hi Wil,

That worked pretty well. Should have tried that, but it was already
pretty late ;-).

Thanks!

Boudewijn

-- 
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.



[Puppet Users] Re: Requiring defines from other classes in a fact

2012-04-16 Thread Wil Cooley
On Apr 16, 2:39 pm, Boudewijn Ector 
wrote:

> Very very simple, except for the fact that I want to add the
> dependency for the mysql::database too. I'm using this excellent
> module for managing mysql:https://github.com/camptocamp/puppet-mysql
>
> Is there a neat way to do something like this
>
>       service{"openca":
>            ...
>            requires => [Package["openca"],mysql::database["openca"]],
>       }
>
> I already tried doing this, and also tried dependency chaining, but
> just can't get it to work at all.

You've almost got it here; you need to use reference syntax for the
mysql::database resource just like you do for the package:

    requires => [Package["openca"],Mysql::Database["openca"]],

Wil

-- 
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.