Hi The service in this case is ypbind but it could apply to other services. The problem is that `service ypbind status' returns 0 if the service is running even if it's not bound to the domain.
Replacing hasstatus with `status => "/usr/bin/ypwhich"' doesn't fix it either because puppet will then try to start the service (instead of restarting it) which fails because it's already running. To cover both cases (not running or running but not bound), I configured it like this: service { "ypbind": ensure => running, enable => true, hasrestart => true, hasstatus => true, require => Package["ypbind"], } exec { "/sbin/service ypbind restart": path => ["/usr/bin", "/sbin"], unless => "ypwhich" } That works but I was wondering if there's a better way not using exec. Thanks -- Ian -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.