voxpupuli / puppet-collectd

Collectd module for Puppet
https://forge.puppet.com/puppet/collectd
Apache License 2.0
69 stars 272 forks source link

collectd::plugin::rabbitmq manifest - Should have a OS test override option #1018

Open ArcticSnowman opened 1 year ago

ArcticSnowman commented 1 year ago

The current collectd::plugin::rabbitmq manifest https://github.com/voxpupuli/puppet-collectd/blob/master/manifests/plugin/rabbitmq.pp - will not allow the plugin to be install on newer OS, as it assumes that Python3 is the default.

There is no ability to bypass this OS version check, even when a host was Python2 as the default .

Please add the ability to bypass this check so that the plugin can be installed.

if $facts['os']['family'] == 'Debian' and versioncmp($facts['os']['release']['major'], '11') >= 0 or
  $facts['os']['family'] == 'RedHat' and versioncmp($facts['os']['release']['major'], '8') >= 0 or
  $facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['major'], '20.04') >= 0 {
    fail('https://pypi.org/project/collectd-rabbitmq/ does not support Python 3')
  }