This is only a guess, but is Augeas doing a STRING comparison of the values instead of a NUMERICAL one?
String-wise, "7000" < "80" but numerically it's the other way around. Can you try setting the current value to '1' and see if Augeas wants to change it to 784009728. If it does, then that's the issue. As to WHY it would be doing a string-wise comparison, I don't know. It could be down to the version of Augeas or the Puppet agent. Try upgrading to the latest and test it again... Steve Steve Shipway University of Auckland ITS UNIX Systems Design Lead s.ship...@auckland.ac.nz Ph: +64 9 373 7599 ext 86487 ________________________________________ From: puppet-users@googlegroups.com [puppet-users@googlegroups.com] on behalf of rvlinden [rene.vanderlinde...@gmail.com] Sent: Wednesday, 15 February 2012 10:26 a.m. To: Puppet Users Subject: [Puppet Users] Augeas question a<b 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 puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.