On December 12, 2013 at 6:31:45 AM, Jeff Bachtel 
([email protected]) wrote:
(repost from puppet-users) 

When creating a provider that uses a command not in PATH, what is the 
best-practice pattern for case'ing out different potential locations? As 
an example, the puppetlabs rabbitmq pupmod has a rabbitmqplugins 
provider that falls down on CentOS using the rabbitmq upstream package 
due to rabbitmq-plugins being in /usr/lib/rabbitmq/bin . 

As an aside (I don't know how often Puppet devs read this list), could 
the Puppet::Util::which method perhaps be extended to add a non-user 
PATH-like variable to the path search string? Something like 
PUPPET_PROVIDER_PATH, if it exists, being concatenated before PATH. I 
could then configure the system environment on weird hosts to provide 
that variable for puppet without mucking with user/system PATH. 


I don’t know what the current best practice is, but I struggled with this a lot 
in early days, and I concluded that it was essentially always better to expand 
the PATH than build other mechanisms.


-- 
http://puppetlabs.com/ | http://about.me/lak | @puppetmasterd

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/etPan.52a9e2f5.71ea1109.3419%40claymore.local.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to