Todd Zullinger wrote: > Brice Figureau wrote: >> On 10/03/09 23:02, Oliver Hookins wrote: >>> Ahh! That breaks the behaviour I was trying to fix by reporting the >>> inconsistency. So now instead of having releases numbered 3, 4, 5 >>> across the board it could well end up 3.8, 4.6, 5.3 etc which in my >>> opinion is much harder to make use of since Puppet conditionals >>> don't support substring matching. > > What's bad is that facter reports 5.2 for CentOS and 5 for RHEL. I > don't much care which way it goes, but the inconsistency across what > should be nearly identical systems is what I think needs to be > rectified.
That's fine. We just want to get rid of the inconsistency with the
minimum amount of user pain.
If we're going in the style of other facts we'd get:
$operatingsystemrelease => 5.2
$operatingsystemmajrelease => 5
This is how the other "maj" facts work currently.
Sadly I think that is going to cause the most distress but +1 for
consistency.
>> I contributed a versioncmp Puppet function a while back to ease such
>> comparison. I _think_ it will be in 0.24.8.
>>
>> Usage:
>> if versioncmp("5.3", "4.8")> 0 {
>> # blah blah
Hmmm I thought it was in 0.24.8rc1 too. Ah it's in master not 0.24.x.
I'll cherry pick for rc2/the release.
James
--
Author of:
* Pulling Strings with Puppet
(http://www.amazon.com/gp/product/1590599780/)
* Pro Nagios 2.0
(http://www.amazon.com/gp/product/1590596099/)
* Hardening Linux
(http://www.amazon.com/gp/product/1590594444/)
signature.asc
Description: OpenPGP digital signature
