saz / puppet-sudo

Manage sudo with Puppet on Debian-, RedHat- and SUSE-based linux distributions and some BSDs
Other
107 stars 215 forks source link

do not fail without sudoversion fact on modern os's #226

Closed LadyNamedLaura closed 4 years ago

LadyNamedLaura commented 6 years ago

The main problem here is that any module depending on puppet-sudo has to manually specify the sudoversion fact in its rspec tests because otherwise it will fail. since versioncmp fails hard when you pass it undef an alternative would be something like:

if (!$::sudoversion or versioncmp($::sudoversion, '1.7.2p1') < 0)

this would still print the warning, but not fail the manifest compilation.

saz commented 5 years ago

I'm happy for any PR resolving this issue.

saz commented 4 years ago

If this issue still exists, feel free to send in a pull request. Closing this now.