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

pam/redhat: use versioncmp function in conditional #67

Merged
merged 2 commits into from Apr 28, 2021

Conversation

mattiasgiese-giz
Copy link
Contributor

Pull Request (PR) description

Use the built-in versioncmp function to check the version of the distribution, otherwise current Puppet installations fail with a type error (cannot compare String with Integer)

This Pull Request (PR) fixes the following issues

see above.

@@ -20,7 +20,7 @@

case $ensure {
'present': {
if ($facts['os']['release']['major'] >= 7) {
if versioncmp($::facts['os']['release']['major'], '7') > 0 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:: for top-level variables isn't needed anymore:

Suggested change
if versioncmp($::facts['os']['release']['major'], '7') > 0 {
if versioncmp($facts['os']['release']['major'], '7') > 0 {

@bastelfreak bastelfreak added the bug Something isn't working label Apr 28, 2021
@bastelfreak bastelfreak merged commit 14a070d into voxpupuli:master Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants