define additional properties for provider plugins

0 views
Skip to first unread message

domgo...@googlemail.com

unread,
Nov 26, 2009, 4:37:44 AM11/26/09
to Puppet Developers
Hi,

in order to restart some of our services installed by openpkg, we
programmed a small openpkg service provider and deploy it as module.
As openpkg packages can be installed in differant prefixes, it would
be really helpfull to provide a prefix property to our service plugin:

service { "openssh":
provider => "openpkg",
prefix => "/prefix",
}

But as all properties seems to be defined in service.rb, i'm not
really sure how to implement that without actually patching puppet
itself.

Does anybody have an idea?

Cheers, Mario

Luke Kanies

unread,
Nov 28, 2009, 1:11:59 PM11/28/09
to puppe...@googlegroups.com
The only way is to add an extra parameter to the resource type.

The way some providers have gotten around this (e.g., some of the
package providers) is by embedding things like prefixes in the name,
so you'd have something like:

service { "/prefix/openssh": ... }

Obviously this is a bit hackish, but until the system can be enhanced
to support what you need, it can work.

--
Sometimes I think we're alone. Sometimes I think we're not. In
either case, the thought is staggering. --R. Buckminster Fuller
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com

Reply all
Reply to author
Forward
0 new messages