On 05/11/2010 05:45 AM, Dick Davies wrote:
I've been using Puppet very happily for the last 6 months
or so to manage our CentOS and RHEL servers.

Over the summer I want to knock things up a notch<bam />,
and part of that is going to be supporting a wider range of OSes.
First on the hit list are likely to be Solaris 10 and Suse (SLES).

I know a lot of people do support multiple OSes, just wondered
what sort of approach you've found works best?


Of course at the end of the day it's a question of 'case $operatingsystem'
statements, but I wondered whether you create a dedicated 'os' module,
or whether you structure each module in a standard way, or something
else.

Thanks for any pointers.

Generally if the changes are really profound, I will split a module into os-specific classes inside init.pp using an operatingsystem case statement. If the changes are small I will use selectors in the resources. I also set a bunch of resource defaults in site.pp to make multi-os modules more readable. An example is OpenBSD; there is no root group, so I do this:

File {
   backup => "main",
   ensure => "present",
   group  => $kernel ? {
                Linux   => "root",
                OpenBSD => "wheel"
             },
   owner  => "root"
}


--
Joe McDonagh
AIM: YoosingYoonickz
IRC: joe-mac on freenode
"When the going gets weird, the weird turn pro."

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