My site.pp: file { "/etrade/home/jleggett/puppettest": owner => jleggett, mode => 644, ensure => present, } service { "bluetooth": ensure => stopped, } The first works fine, the second is not stopping bluetooth not a valid value for ensure maybe? What are ALL the valid values for ensure? (Can''t seem to find that in wiki) shouldn''t there be an erorr in logs somewhere that stopped is not a valid value? [jleggett@lxp6d4m3 manifests]$ sudo /sbin/service bluetooth status hcid (pid 9313) is running... sdpd (pid 9317) is running... [jleggett@lxp6d4m3 manifests]$ [jleggett@lxp6d4m3 manifests]$ tail /var/log/messages May 19 12:03:24 lxp6d4m3 puppetd[9096]: Starting catalog run May 19 12:03:24 lxp6d4m3 puppetd[9096]: Finished catalog run in 0.05 seconds May 19 12:29:29 lxp6d4m3 ntpd[2377]: can''t open /etc/ntp/drift.TEMP: Permission denied May 19 12:33:24 lxp6d4m3 puppetd[9096]: Starting catalog run May 19 12:33:24 lxp6d4m3 puppetd[9096]: Finished catalog run in 0.05 seconds May 19 13:03:23 lxp6d4m3 puppetd[9096]: Starting catalog run May 19 13:03:23 lxp6d4m3 puppetd[9096]: Finished catalog run in 0.05 seconds May 19 13:29:29 lxp6d4m3 ntpd[2377]: can''t open /etc/ntp/drift.TEMP: Permission denied May 19 13:33:23 lxp6d4m3 puppetd[9096]: Starting catalog run May 19 13:33:23 lxp6d4m3 puppetd[9096]: Finished catalog run in 0.05 seconds --~--~---------~--~----~------------~-------~--~----~ 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 May 19, 2008, at 10:53 AM, Jeff Leggett wrote:> > My site.pp: > > file { "/etrade/home/jleggett/puppettest": > owner => jleggett, > mode => 644, > ensure => present, > } > > service { "bluetooth": > ensure => stopped, > }Because the running daemons don''t match the service name you''ll need to specify a way to check for status, or a pattern to use when running ps: For example: status => "/bin/ps -ef | /bin/grep h[c]id" http://reductivelabs.com/trac/puppet/wiki/TypeReference#service -Blake --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ah I see... I took where it said that Red Hat was both: # enableable: The provider can enable and disable the service # refreshable: The provider can restart the service. That it "knew" already how to do so. I see now, it needs the status for a service. That''s not really clear in the Type Reference. On May 19, 2:27 pm, Blake Barnett <sha...@gmail.com> wrote:> On May 19, 2008, at 10:53 AM, Jeff Leggett wrote: > > > > > My site.pp: > > > file { "/etrade/home/jleggett/puppettest": > > owner => jleggett, > > mode => 644, > > ensure => present, > > } > > > service { "bluetooth": > > ensure => stopped, > > } > > Because the running daemons don''t match the service name you''ll need > to specify a way to check for status, or a pattern to use when running > ps: > For example: > status => "/bin/ps -ef | /bin/grep h[c]id" > > http://reductivelabs.com/trac/puppet/wiki/TypeReference#service > > -Blake--~--~---------~--~----~------------~-------~--~----~ 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> Ah I see... I took where it said that Red Hat was both: > > # enableable: The provider can enable and disable the service > # refreshable: The provider can restart the service. > > That it "knew" already how to do so. I see now, it needs the status > for a service. That''s not really clear in the Type Reference.the problem is that many distros don''t have the status in the init.d scripts, this is why hasstatus is set to false by default. you can set hasstatus => true which will also work for your case. 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 -~----------~----~----~----~------~----~------~--~---
Hiya! Peter Meier wrote:> Hi > > >> Ah I see... I took where it said that Red Hat was both: >> >> # enableable: The provider can enable and disable the service >> # refreshable: The provider can restart the service. >> >> That it "knew" already how to do so. I see now, it needs the status >> for a service. That''s not really clear in the Type Reference. >> > > > the problem is that many distros don''t have the status in the init.d > scripts, this is why hasstatus is set to false by default. > > you can set hasstatus => true which will also work for your case. >This only works when the init scripts conform to the LSB[1] specifications.. i.e. $? = 0 RUNNING $? = 3 NOT RUNNING If the init script does not conform, it''s recommended (as earlier posted) to specify ''pattern'' with a regex match on the process name (Ruby Regex, ''ntp'' == /ntp/)> greets Pete > > > >Regards, AJ [1] http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---