From:
puppet...@googlegroups.com [mailto:
puppet...@googlegroups.com] On Behalf Of Bill Sirinek
> I'm not sure you need a custom fact for this. Can you just check to see if,
> for example, Service['autofs'] or Service['autofs.service'] are defined?
Don't think so. Service is for *controlling* existing services, so using the fact seems ok to me in case the service
file doesn't come as part of a package, in which case one could simply assume that if that package is installed,
the service must also be there:
package { 'mypkg':
...
}
service { 'myservice':
...
require => Package['mypkg'],
}
OTOH, if it is a custom service, one could as well manage the service file with Puppet, so that you can be sure it
exists when you want to manage it, like
file { '/etc/init.d/myservice':
...
}
service { 'myservice':
...
require => File['/etc/init.d/myservice'],
}
HTH...
Dirk