This message was deleted.
# puppet-enterprise
s
This message was deleted.
r
Would guess it's a data type problem. Is it 9 or "9"? I'm a big fan of https://www.puppet.com/docs/puppet/7/function.html#versioncmp for just this sort of reason.
m
would make sense, but not sure why 3 other hosts have been fine
s
What do you get when you output the value of $facts['os']['release']['major']? I would first guess there's something wrong with what is being returned as the value of that fact.
r
oh it's one host out of several with the issue. I'd try to see what the data looks like. Something like
Copy code
$test = $facts['os']['release']['major']
if $test =~ Integer {
  notify { "os.major is Integer and value is ${test}": }
} elsif $test =~ String {
  notify { "os.major is String and value is ${test}": }
}
m
'9' - would be correct in my test class here. It is a string. and it was '9' in my original problem class for my yum repos. So I go back and add this ^ $test block. And it then runs properly on the host... and gives me the rhel 9 repos... arggh. same happened with my autofs config. made what shouldn't be a significant change (added a comment within an if block in the template. and boom it worked as expected
ok, major user error. the original module wasn't up to date in this environment...
d
Just for future reference you can confirm the types of core facts at https://www.puppet.com/docs/puppet/8/core_facts.html
v
yep, version is a string. stepped on windows with major release
2012 R2
windows