On Thu, Feb 17, 2011 at 4:09 AM, Daniel Piddock
<[email protected]> wrote:
> On 17/02/11 11:45, Felix Frank wrote:
>>> e.g.: file { 'something': require => Class['ssh'] }
>>> class ssh gets processed but ssh::install and ssh::config might not be,
>>> unless I put a depend on something deeper within it. Which defeats the
>>> idea of organising into classes a bit.
>> Where have you gotten that idea from? Is this documented?
>>
>> AFAIK, requiring Class[ssh] will require all resources declared by class
>> ssh, and it doesn't matter whether those resources are declared through
>> include or directly in the class.
>>
>> Correct me if I'm wrong, please.
>
> My first mail to the group was about this very issue with the conclusion
> of using require instead of include:
> http://groups.google.com/group/puppet-users/browse_thread/thread/64e4dde981c79ffb/bbb8bdc4ab78c328?lnk=gst
>
> A require does require everything defined within the class but it does
> not put a dependency on other classes pulled in by an include.

Yep. If you need to achieve this, you'll need Class[ssh] to require
Clas[ssh::install, ssh::config] rather than simply including.




>
>> If I *am* wrong on this one, here's what should be safer:
>> class ssh {
>>   include ssh::install
>>   require ssh::config
>> }
>>
>> and have all resources in ssh::config require Class[ssh::install], but
>> that would be ugly and a bit evil (although not as evil as requiring two
>> interrelated classes).
>>
>> All this aside, I looked at your error again and begin to doubt that
>> this is the root cause of your problems. Your catalog should either
>> apply or be rejected because of cyclic dependencies. Something else must
>> be fishy. Does the catalog work if your node doesn't include ssh at all?
>
> I managed to solve the problem by installing the openssh-server package
> manually so the init script was present. I have other modules with a
> very similar structure and they weren't throwing up these errors. Odd
> glitch. Frustrating.
>
> Cheers,
> Dan
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to