Closed nagyt234 closed 5 years ago
@nagyt234 The source
property refers to one from Puppet package provider: https://puppet.com/docs/puppet/5.5/types/package.html#package-attribute-source
The sensu_gem
provider inherits most behavior from Puppet's gem
provider. The only thing changed by sensu_gem
is where to find the actual gem command and how to handle uninstalls. My read of Puppet's gem
provider (https://github.com/puppetlabs/puppet/blob/5.5.x/lib/puppet/provider/package/gem.rb#L127) is that source
should work the way your attempting to use it. Can you uninstall the improperly installed gem and re-run puppet with --debug
? I'm curious to see if your provided source is making it to the gem
command.
I ran locally in Vagrant and looks like the desired behavior is taking place:
[root@sensu-server modules]# puppet resource package sensu-plugins-mysql ensure=latest provider=sensu_gem source=https://github.com/nagyt234/sensu-plugins-mysql.git --debug
<SNIP>
Debug: Executing: '/opt/sensu/embedded/bin/gem install --source https://github.com/nagyt234/sensu-plugins-mysql.git sensu-plugins-mysql'
@nagyt234 Were you able to resolve this issue?
@nagyt234 Closing as @treydock shows this is not still an issue in his testing. If this is closed in error and this issue is still happening, please re-open it and we'll be happy to work with you on it.
Released in v2.60.0
Description of problem
What did you do? I tried to install sensu-plugins-mysql from my forked gihub reposityr with the following command:
What happened? The plugin was installed from
sensu-plugins/sensu-plugins-mysql
instead of my reponagyt234
.What did you expect to happen? The plugin should be installed from
https://github.com/nagyt234/sensu-plugins-mysql.git
as stated insensu-puppet/lib/puppet/provider/package/sensu_gem.rb
How can someone reproduce the problem? Try the command above.
Command used and debugging output
What does your puppet config look like (including any hiera config)
Is this a masterless or master based puppet setup?
Platform and version information
Anything else to add that you think will be helpful?