Hello. We''re running a mix of Redhat and SL, for the same reasons I would guess many others do, which is to say it saves us money on "misc" servers where support contracts, ISV/IHV certification and so forth aren''t needed. I''m curious about how others handle this with regards to Facter and OS detection in manifests? Do you simply add cases for $operatingsystem = Scientific? Regards Johan -- 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.
It depends on the complexity of your classes. For a lot of the time you can use variables for the difference between operating systems and then use conditional logic to populate those variables, like: $pkg = $operatingsystem ? { ''RedHat'' => "woof", ''Fedora'' => "meow", } package { $pkg: } I''ve never used Scientific Linux though so I don''t know how much it differs from Red Hat. If you have to start doing very different things between OS versions, some people prefer to conditionally include sub classes that are geared towards an individual OS: class stuff { if ($operatingsystem == ''Fedora'') { include stuff::fedora } elsif ($operatingsystem == ''RedHat'') { include stuff::redhat } } else { fail("The OS ${operatingsystem} is not supported by the ''stuff'' class.") } } On Oct 14, 7:16 am, Johan Sunnerstig <Johan.Sunners...@auriga.se> wrote:> Hello. > We''re running a mix of Redhat and SL, for the same reasons I would guess many others do, which is to say it saves us money on "misc" servers where support contracts, ISV/IHV certification and so forth aren''t needed. > > I''m curious about how others handle this with regards to Facter and OS detection in manifests? Do you simply add cases for $operatingsystem = Scientific? > > Regards > Johan-- 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.
On Fri, Oct 14, 2011 at 10:05 AM, Luke Bigum <Luke.Bigum@lmax.com> wrote:>> We''re running a mix of Redhat and SL, for the same reasons I would guess many others do, which is to say it saves us money on "misc" servers where support contracts, ISV/IHV certification and so forth aren''t needed. >> >> I''m curious about how others handle this with regards to Facter and OS detection in manifests? Do you simply add cases for $operatingsystem = Scientific? >>The recently released facter contains a new fact $osfamily Facter 1.6.2. available ##New fact: (6792) Added osfamily fact. Added osfamily fact to determine if a given operating system is a derivative of a common operating system. this is equal to redhat for redhat, centos, sl, slc, slf, sld, ... -- Steve Traylen -- 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.
That''s exactly how I use the facter facts, my classes aren''t terribly complex, most of my usage is in the subtle differences, service names, file locations, etc. SL is like CentOS, pretty much a respin sans the Redhat trademarks and such. For my current purposes it''s exactly the same which is the reason I''m asking. Regards Johan ________________________________________ From: puppet-users@googlegroups.com [puppet-users@googlegroups.com] on behalf of Luke Bigum [Luke.Bigum@lmax.com] Sent: 14 October 2011 10:05 To: Puppet Users Subject: [Puppet Users] Re: Redhat and Scientific Linux It depends on the complexity of your classes. For a lot of the time you can use variables for the difference between operating systems and then use conditional logic to populate those variables, like: $pkg = $operatingsystem ? { ''RedHat'' => "woof", ''Fedora'' => "meow", } package { $pkg: } I''ve never used Scientific Linux though so I don''t know how much it differs from Red Hat. If you have to start doing very different things between OS versions, some people prefer to conditionally include sub classes that are geared towards an individual OS: class stuff { if ($operatingsystem == ''Fedora'') { include stuff::fedora } elsif ($operatingsystem == ''RedHat'') { include stuff::redhat } } else { fail("The OS ${operatingsystem} is not supported by the ''stuff'' class.") } } On Oct 14, 7:16 am, Johan Sunnerstig <Johan.Sunners...@auriga.se> wrote:> Hello. > We''re running a mix of Redhat and SL, for the same reasons I would guess many others do, which is to say it saves us money on "misc" servers where support contracts, ISV/IHV certification and so forth aren''t needed. > > I''m curious about how others handle this with regards to Facter and OS detection in manifests? Do you simply add cases for $operatingsystem = Scientific? > > Regards > Johan-- 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. -- 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.
That sounds promising. I''m currently using the EPEL repository to install Puppet, and they''re at 1.6.0. I guess I''ll have to decide what''s less trouble, installing Puppet some other way or rewriting a bunch of manifests. :) Thanks Johan ________________________________________ From: puppet-users@googlegroups.com [puppet-users@googlegroups.com] on behalf of Steve Traylen [steve.traylen@cern.ch] Sent: 14 October 2011 10:19 To: puppet-users@googlegroups.com Subject: Re: [Puppet Users] Re: Redhat and Scientific Linux On Fri, Oct 14, 2011 at 10:05 AM, Luke Bigum <Luke.Bigum@lmax.com> wrote:>> We''re running a mix of Redhat and SL, for the same reasons I would guess many others do, which is to say it saves us money on "misc" servers where support contracts, ISV/IHV certification and so forth aren''t needed. >> >> I''m curious about how others handle this with regards to Facter and OS detection in manifests? Do you simply add cases for $operatingsystem = Scientific? >>The recently released facter contains a new fact $osfamily Facter 1.6.2. available ##New fact: (6792) Added osfamily fact. Added osfamily fact to determine if a given operating system is a derivative of a common operating system. this is equal to redhat for redhat, centos, sl, slc, slf, sld, ... -- Steve Traylen -- 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. -- 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.
Johan Sunnerstig wrote:> That sounds promising. I''m currently using the EPEL repository to > install Puppet, and they''re at 1.6.0. > I guess I''ll have to decide what''s less trouble, installing Puppet > some other way or rewriting a bunch of manifests. :)1.6.1 is in epel-testing. Once it moves to stable, we''ll push 1.6.2. (This process can be sped up if EPEL users snag a Fedora account and use the Bodhi update tool¹ to give positive or negative feedback on updates.) ¹ https://admin.fedoraproject.org/updates -- Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To grasp the true meaning of socialism, imagine a world where everything is designed by the post office, even the sleaze. -- P.J. O''Rourke
Steve Traylen wrote:> The recently released facter contains a new fact $osfamily > > Facter 1.6.2. available > > ##New fact: (6792) Added osfamily fact. > > Added osfamily fact to determine if a given operating system is a > derivative of a common operating system. > > this is equal to redhat for redhat, centos, sl, slc, slf, sld, ...One thing that might make this fact less useful for folks that have both EL and Fedora systems is that Fedora is in the same osfamily. That makes sense in some cases and not in others. I''ve yet to start using this fact in my own manifests, so I''m not sure whether I''ll like it or not. :) -- Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It''s always darkest just before it goes pitch black. -- Demotivators (www.despair.com)
On Fri, Oct 14, 2011 at 6:20 AM, Todd Zullinger <tmz@pobox.com> wrote:> Steve Traylen wrote: >> The recently released facter contains a new fact $osfamily >> >> Facter 1.6.2. available >> >> ##New fact: (6792) Added osfamily fact. >> >> Added osfamily fact to determine if a given operating system is a >> derivative of a common operating system. >> >> this is equal to redhat for redhat, centos, sl, slc, slf, sld, ... > > One thing that might make this fact less useful for folks that have > both EL and Fedora systems is that Fedora is in the same osfamily. > That makes sense in some cases and not in others. > > I''ve yet to start using this fact in my own manifests, so I''m not sure > whether I''ll like it or not. :) > > -- > Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > It''s always darkest just before it goes pitch black. > -- Demotivators (www.despair.com) > >We have facter 1.6.2 on yum.puppetlabs.com/el if needed also. -- 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.