Thanks all, think I had it in my head that a general 'os' module
could do simplify this, but I think you're probably right that handling
in the individual modules is better.
Then I can migrate to multi-platform support module by module,
and there's much less cross-module dependencies involved.

Thanks again!


On Fri, May 14, 2010 at 6:17 PM, donavan <[email protected]> wrote:
> On May 12, 1:03 am, Rohan McGovern <[email protected]> wrote:
>> I've been doing it like this, for an example module
>> named "baselayout":
>>
>>  modules/baselayout/manifests/init.pp:
>>
>>     import "*"
>>     class baselayout {
>>       case $operatingsystem {
>>         Darwin:   { include baselayout::mac }
>>         OpenSuSE: { include baselayout::suse }
>>       }
>>     }
>>
>>  modules/baselayout/manifests/mac.pp:
>>
>>     class baselayout::mac {
>>        ...
>>     }
>>
>>  modules/baselayout/manifests/suse.pp:
>>
>>     class baselayout::suse {
>>        ...
>>     }
>>
>>  ... etc.  I've just started, so there could be problems with this I
>> haven't hit yet.
>
> +1 on this method. I handle it pretty much the same way. The
> difference would be using a modulename::base class for all of the
> common setup. Depending on the specific child classes they can then
> inherit modulename::base or include it. A simple exmaple can be seen
> in the Camp to Camp augeas module[1]. In general I try to avoid using
> parameter selectors for this type of customization.
>
> [1] 
> http://github.com/camptocamp/puppet-augeas/blob/master/manifests/classes/augeas.pp
>
> --
> 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