On Fri, Apr 11, 2014 at 7:15 PM, Tim Mooney <tim.moo...@ndsu.edu> wrote:
>
> The tl;dr version:
>
> Can anyone point me at an example of an existing provider that selects
> a particular command based not on a facter fact or whether a particular
> path exists, but instead on a variable from a puppet class?
>
> The full version:
>
> We have puppet 3.4.2 on master and all agents, generally from the
> PuppetLabs packages for OpenSource puppet.
>
> Red Hat has begun providing alternate (updated) versions of some packages
> as part of its "Software Collections Library", aka SCL.  If you have
> a RHEL 6.5 system subscribed to the appropriate software collections
> channel, it's entirely possible to have something like this:
>
> $ rpm -q -f /usr/bin/mysql
> mysql-5.1.73-3.el6_5.x86_64
> $ rpm -q -f /opt/rh/mysql55/root/usr/bin/mysql
> mysql55-mysql-5.5.36-1.1.el6.x86_64
>
> For a provider that relies on the mysql command-line tool to accomplish
> certain tasks, it's no longer a great solution to just do
>
>         commands :mysql => 'mysql'
>
> I also don't want to just have it always use the binary from
> /opt/rh/mysql55/root/usr/bin/mysql if it's present, since it's at least
> conceivable that one might need to use a particular version of the client
> when accessing a particular database.
>
> The best idea I've come up with is to have the provider decide which
> specific version of a command to use based on a variable that has already
> been set in the class, but I haven't found any examples of providers that
> do that.  If anyone can point me at some prior art, I would greatly
> appreciate it.
>

An example of pe_gem v.s. package built in ruby gem provider:
https://github.com/puppetlabs/puppetlabs-pe_gem

HTH,

Nan

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CACqVBqD06H9mha4A4TAQXActPau1HGdCzHgfT%2B_BJxP8UhNHag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to