Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sensu plugin could do with a source param #899

Closed
ghost opened this issue Apr 30, 2018 · 1 comment
Closed

sensu plugin could do with a source param #899

ghost opened this issue Apr 30, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 30, 2018

Description of problem

When using sensu plugin type package:

'package': {
      $gem_install_options_real = $pkg_provider ? {
        'gem'   => $gem_install_options,
        default => undef,
      }

      package { $name:
        ensure          => $pkg_version,
        provider        => $pkg_provider,
        install_options => $gem_install_options_real
      }
    }

There is no source option. So when behind a proxy it fails.
In this case I am using sensu_gem provider to use the embedded ruby.

Also above if the pkg_provider is sensu_gem default becomes undef for install options. So install options do not work.

Though looking at the parent gem provider gem list operations do not use install_options but only source. So it will still be preferable to have a source option available.

It would be nice to add a pkg_source param for this so we can supply a source option.

Something like:

'package': {
      $gem_install_options_real = $pkg_provider ? {
        'gem'   => $gem_install_options,
        'sensu_gem' => $gem_isntall_options,
        default => undef,
      }

      package { $name:
        ensure          => $pkg_version,
        provider        => $pkg_provider,
        install_options => $gem_install_options_real
        source     => $pkg_source,
      }
    }

  • What did you do?
    Tried to install plugins using the sensu_gem provider

  • What happened?
    As part of the operation a gem list is done and if behind a proxy this fails as the only var/option available to use is "install_options" which is not used during a list operation inherited from the gem provider to the sensu_gem provider.

  • What did you expect to happen?

  • How can someone reproduce the problem?
    Run behind a proxy using the sensu_gem provider

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

  • Your OS: U16
  • Your Ruby version: Sensu Embedded ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
  • Your version of Puppet: 5.0.1
  • Your version of Sensu: 1.3.3-1
  • Your version of this module: 2.52.0

Anything else to add that you think will be helpful?

Or please feel free to show me if there is a better way to do this?

@ghost
Copy link
Author

ghost commented May 23, 2018

Will close this, looking at the 2.53.0 changelog: #878 has implemented this.

@ghost ghost closed this as completed May 23, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants