Hello, we are setting up puppet and using multiple environments (development, staging, qa, production), so far we are trying to keep to the BestPractices2 from the wiki[1]. Now we need to decide on how to manage different distros. Do you just create modules for that or extensively use "case" statements with facts to correctly manage things. I''m really just looking on input wether you keep a single module that handles say Debian/Etch, Debian/Lenny, Redhat, Solaris or do you use different modules for those? I can''t really decide wether it''ll be less painfull to case $operatingsystem: { "debian": { # do this } "solaris": { # do that } default: { # do even more stuff } } or have modules like: hosts.debian.pp hosts.solaris.pp hosts.default.pp (1) <environment> |-- manifests | |-- classes | | |-- base.pp | | |-- clients.pp | | |-- dnsclients.pp | | `-- sysmaint.pp | |-- nodes | | |-- default.pp | | |-- dev-prod.in.inqnet.at.pp | | |-- dev.puppet.in.inqnet.at.pp | | |-- master.puppet.pp | | `-- prod.puppet.in.inqnet.at.pp | `-- site.pp `-- modules |-- apt | |-- README | |-- files | |-- manifests | `-- templates |-- skeleton | |-- README | |-- files | |-- manifests | `-- templates |... -- http://www.xing.com/profile/Martin_Marcher You are not free to read this message, by doing so, you have violated my licence and are required to urinate publicly. Thank you. --~--~---------~--~----~------------~-------~--~----~ 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-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Hi> we are setting up puppet and using multiple environments (development, > staging, qa, production), so far we are trying to keep to the > BestPractices2 from the wiki[1]. > > Now we need to decide on how to manage different distros. Do you just > create modules for that or extensively use "case" statements with > facts to correctly manage things. I''m really just looking on input > wether you keep a single module that handles say Debian/Etch, > Debian/Lenny, Redhat, Solaris or do you use different modules for > those?I have taken the following approach: class module { case $operatingsystem { centos: { include module::centos } debian: { include module::debian } base: { include module::base } } } class module::base { package{''module'': ensure => present, } service{''module'': ensure => running, enable => true, } } class module::centos inherits module::base { Service[''module'']{ name => ''moduled'', } file{''/etc/sysconfig/module'': [...] notify => Service[''module''], } } class module::debian inherits module::base { Package[''module'']{ name => ''module2'', } } all what is general goes into the base class, all what is distro specific goes in a distro specific subclass. you can even fine grain the statement with classes per debian releases and a general class for debian etc. see for example http://github.com/duritong/puppet-djbdns/tree/master/manifests/init.pp or other modules from me. so every module manages itself what needs to be done for a specific distro and you only need one case statement per module. in global I have a default config class which includes all general modules (like shorewall, denyhosts etc.) and modules per distro in a seperate case statement, like the yum module which is only needed on centos. dunno if I could answer your question or this approach is good. for me it makes sense and it is nice to work with. greets pete --~--~---------~--~----~------------~-------~--~----~ 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-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, On Tue, Jul 22, 2008 at 7:11 PM, Nigel Kersten <nigelk@google.com> wrote:> > Our base module does all this work really, so we have: > > base::mac > base::linuxhmm sounds all reasonable. I''ll try to keep to that, maybe I''ll be able to publicly post our recipe repo too then it''s at least somewhere where common suggestions are leading. Of course that''s not exactly a hard rule one can keep to but I like to keep to a common base as much as possible. thanks martin -- http://www.xing.com/profile/Martin_Marcher You are not free to read this message, by doing so, you have violated my licence and are required to urinate publicly. Thank you. --~--~---------~--~----~------------~-------~--~----~ 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-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---