I''m writing a module that turns off various services that aren''t needed on my standard build. This is trivial if I am running the same OS on the same hardware. However, some of my servers have hardware- specific daemons, some of them run Debian, or Solaris as well as CentOS or Redhat. Given that part of the point of puppet is to be able to operate at a higher level and not get bogged down in the detail of what services are called on each machine, what''s the best way to handle this? For example, I don''t need yum-updatesd on my CentOS/RHEL machines. But if I ask puppet to ensure this is stopped, how will it react when trying to stop this on a Debian machine? I suspect the answer is to use the operatingsystem fact, and use a per- OS class , but it would be much nicer to have just one class which describes all the services I don''t want to run, regardless of distro or OS, and have puppet work out the detail. Any ideas? S. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
There''s no real way to automate the one class, multiple operatingsystems stuff, apart from case statements/selectors.. include badservices::$operatingsystem ? Asking puppet to stop a service that doesn''t exist (no init script) yields a warning, ''could not find init script for Service[blah]'' or similar, iirc. Regards, AJ On Wed, Aug 20, 2008 at 7:58 PM, Stephen <atalanta.systems@googlemail.com>wrote:> > I''m writing a module that turns off various services that aren''t > needed on my standard build. This is trivial if I am running the same > OS on the same hardware. However, some of my servers have hardware- > specific daemons, some of them run Debian, or Solaris as well as > CentOS or Redhat. > > Given that part of the point of puppet is to be able to operate at a > higher level and not get bogged down in the detail of what services > are called on each machine, what''s the best way to handle this? > > For example, I don''t need yum-updatesd on my CentOS/RHEL machines. > But if I ask puppet to ensure this is stopped, how will it react when > trying to stop this on a Debian machine? > > I suspect the answer is to use the operatingsystem fact, and use a per- > OS class , but it would be much nicer to have just one class which > describes all the services I don''t want to run, regardless of distro > or OS, and have puppet work out the detail. > > Any ideas? > > S. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
2008/8/20 Stephen <atalanta.systems@googlemail.com>:> > I''m writing a module that turns off various services that aren''t > needed on my standard build. This is trivial if I am running the same > OS on the same hardware. However, some of my servers have hardware- > specific daemons, some of them run Debian, or Solaris as well as > CentOS or Redhat.Why not modify your build process to disable / not install packages (and thus services) you don''t need? --~--~---------~--~----~------------~-------~--~----~ 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 Wed, Aug 20, 2008 at 6:40 PM, Duncan Hill <bajandude@googlemail.com> wrote:> Why not modify your build process to disable / not install packages > (and thus services) you don''t need?Because I want them to stay that way. I can (and do) that in my automated builds. However, I can''t predict what some admins will do on the machines, and I can use puppet to help keep things the way they were built. S. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
So, basically, you want purge to work on services? I think that would be handy as well. Trevor On Wed, Aug 20, 2008 at 1:58 PM, Stephen Nelson-Smith <sanelson@gmail.com> wrote:> > On Wed, Aug 20, 2008 at 6:40 PM, Duncan Hill <bajandude@googlemail.com> wrote: > >> Why not modify your build process to disable / not install packages >> (and thus services) you don''t need? > > Because I want them to stay that way. I can (and do) that in my > automated builds. However, I can''t predict what some admins will do > on the machines, and I can use puppet to help keep things the way they > were built. > > S. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Trevor Vaughan wrote:> So, basically, you want purge to work on services? > > I think that would be handy as well. >Feature requests always welcome. That one possibly even already exists. Regards James Turnbull - -- Author of: * Pulling Strings with Puppet (http://www.amazon.com/gp/product/1590599780/) * Pro Nagios 2.0 (http://www.amazon.com/gp/product/1590596099/) * Hardening Linux (http://www.amazon.com/gp/product/1590594444/) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIrL+R9hTGvAxC30ARAlPRAKDKj2RFjx4O0NnXMNf/CvDio1CZPwCeIEgJ JPMYK7e3+HX1iPiuSZiJ23Q=b4HW -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---