Hi,
I'm having some 'strange' issues with augeas and an onlyif statement
This is my code
augeas { "classx_sysctl_shmmax":
incl => '/etc/sysctl.conf',
lens => 'Sysctl.lns',
changes => "set kernel.shmmax ${sysctl_kernel_shmmax}",
onlyif => "get kernel.shmmax < ${sysctl_kernel_shmmax}",
}
I only want to change the kernel.shmmax in /etc/sysctl.conf when the
value is greater than what is currently configured.
For example
kernel.shmmax defauls to 784009728 and I changed it manually to
784009729 (so +1)
=> When puppet runs, nothing needs to be done (as expected)
kernel.shmmax defaults to 784009728 and I changed it manually to
784009727 (so -1)
When puppet runs, it wants to change the value (as expected)
-kernel.shmmax = 784009727
+kernel.shmmax = 784009728
notice: /Stage[main]/Classx/Augeas[classx_sysctl_shmmax]/returns:
current_value need_to_run, should be 0 (noop)
So for now, everything looks fine, however ...
If I change the value to something really small, like from 784009728
to 84009728 (removed the first digit), pupppet does not want to change
it anymore.
What I can see is that puppet/augeas only evaluates values correctly
as long as the number of digits stays the same, so
100 is less than 101
101 is greater than 100
but 99 is greater than 100 ?!? :-(
Anyone an idea how I can configure augeas to do this correctly ??
Regards,
Rene
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.