Hello list.

I'd like to implement a basic 'onlyif' property, as existing in 'exec' type, to 'service' type. Rather than patching the original puppet code, I think I could use the custom type mechanism, and implement my own 'conditional_service' type. However, in order to keep the benefit of existing providers, I think renaming the type isn't the best solution.

So, would it possible to either inherit the original type definition, and just add the new property, or distributing a modified type copy as part of a module would also replace original type definition for this module ?

BTW, the exact intent is to allow to test the configuration file syntax before reloading a service, and avoid reloading it with an invalid state. Something as:

file { "/etc/openldap/slapd.conf":
  content => template("slapd.conf.erb"),
  notify  => Service["slapd"]
}

service { "slapd":
  ensure => "running",
  onlyif => "/usr/sbin/slaptest"
}
--
BOFH excuse #362:

Plasma conduit breach

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to