Howdy, Can someone enlighten me as to how I can disable a service *IF* it is installed? I want to ensure rsyslog is installed and running, which requires syslogd to not be running, but the only way I can see to enforce this in Puppet is to remove the sysklogd package, which I''d rather not do, I''d rather just disable the service if it''s there, but can''t see how. Pointers appreciated Thanks Chris -- 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 Thu, May 5, 2011 at 10:18 PM, Chris Phillips <chris@untrepid.com> wrote:> Howdy, > > Can someone enlighten me as to how I can disable a service *IF* it is > installed? I want to ensure rsyslog is installed and running, which requires > syslogd to not be running, but the only way I can see to enforce this in > Puppet is to remove the sysklogd package, which I''d rather not do, I''d > rather just disable the service if it''s there, but can''t see how. >if you don''t need the software, don''t install it (or ensure its removed). if you need it, tell puppet to ensure its installed and running.... for this specific case, if you use syslog-ng for example, you can ensure that its running, but not sysklogd. my 2 cents. Ohad -- 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.
I ran into this same challenge just a few days ago. I run mostly CentOS and syslogd is installed by default, but I prefer to run rsyslog. Here''s a post, http://itscblog.tamu.edu/managing-syslog-and-log-forwarding-with-puppet/ ,I just did on my blog that has the recipes I used for syslog management. Hope that helps - Trey On May 5, 2:18 pm, Chris Phillips <ch...@untrepid.com> wrote:> Howdy, > > Can someone enlighten me as to how I can disable a service *IF* it is > installed? I want to ensure rsyslog is installed and running, which requires > syslogd to not be running, but the only way I can see to enforce this in > Puppet is to remove the sysklogd package, which I''d rather not do, I''d > rather just disable the service if it''s there, but can''t see how. > > Pointers appreciated > > Thanks > > Chris-- 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.
For syslog-ng, we used the following and it seems to work: case defined(Package["syslog-ng"]) { false: { service { "syslog": enable => false } } } package { "syslog-ng": ensure => installed, provider => yum } service { "syslog-ng": enable => true, require => [ Service["syslog"], Package["syslog-ng"] ] } I am pretty sure that the syslog-ng RPM stops sysklogd along the way. On 6 May 2011 08:12, treydock <treydock@gmail.com> wrote:> I ran into this same challenge just a few days ago. I run mostly > CentOS and syslogd is installed by default, but I prefer to run > rsyslog. Here''s a post, > http://itscblog.tamu.edu/managing-syslog-and-log-forwarding-with-puppet/ > ,I just did on my blog that has the recipes I used for syslog > management. Hope that helps > > - Trey > > On May 5, 2:18 pm, Chris Phillips <ch...@untrepid.com> wrote: > > Howdy, > > > > Can someone enlighten me as to how I can disable a service *IF* it is > > installed? I want to ensure rsyslog is installed and running, which > requires > > syslogd to not be running, but the only way I can see to enforce this in > > Puppet is to remove the sysklogd package, which I''d rather not do, I''d > > rather just disable the service if it''s there, but can''t see how. > > > > Pointers appreciated > > > > Thanks > > > > Chris > > -- > 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.