On May 12, 1:03 am, Rohan McGovern <rohan.mcgov...@nokia.com> 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 puppet-us...@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