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

RedHat 7 version number comparison is incorrect #16

Open
ikke-t opened this issue Sep 8, 2014 · 5 comments
Open

RedHat 7 version number comparison is incorrect #16

ikke-t opened this issue Sep 8, 2014 · 5 comments

Comments

@ikke-t
Copy link

ikke-t commented Sep 8, 2014

the params.pp file has this:

::operatingsystemrelease < '7'

and on rhel7 facter has these:

operatingsystemmajrelease => 7
operatingsystemrelease => 7.0

So you should likely change the if statement to have the major release changed from:

  if $::operatingsystemrelease < '7' {

to

  if $::operatingsystemmajrelease < '7' {

Otherwise you end up comparing string to integer and it doesn't work.

@cipcosma
Copy link

cipcosma commented Oct 5, 2014

on centos 7 there is the same problem:
operatingsystem => CentOS
operatingsystemmajrelease => 7
operatingsystemrelease => 7.0.1406

with the variable name modification in init.pp, it works ok

@KlavsKlavsen
Copy link

works for me as well

@eocarragain
Copy link

$::operatingsystemmajrelease works for us on Centos 7. Thanks

@cdepillabout
Copy link

I was running into the same problem. I was able to fix it with the same fix above.

@TJM
Copy link

TJM commented Feb 12, 2015

Yes, and the error is:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: comparison of String with 7 failed at /etc/puppet/environments/myenvironment/modules/selinux/manifests/params.pp:16 on node ...

maage pushed a commit to cybercom-finland/puppet-selinux that referenced this issue Sep 1, 2016
allow packages to be upgraded
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

6 participants