sensu / sensu-puppet

Sensu Puppet module.
https://github.com/sensu/sensu-puppet
MIT License
165 stars 290 forks source link

Source option with sensu_gem provider doesn't work #1007

Closed nagyt234 closed 5 years ago

nagyt234 commented 6 years ago

Description of problem

Platform and version information

Anything else to add that you think will be helpful?

treydock commented 6 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'
treydock commented 5 years ago

@nagyt234 Were you able to resolve this issue?

ghoneycutt commented 5 years ago

@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.

ghoneycutt commented 5 years ago

Released in v2.60.0