Re: [Puppet Users] Puppet class not working after use augeas-0.10.0-3
Thank you, Dom, now its working good, epel already release new puppet and resolved my issue. On 05/04/2012 03:31 PM, Dominic Cleal wrote: On 04/05/12 04:57, heriyanto wrote: Yes nice.. its work thank you Dominic, but its still execute even its already changed its normal for new augeas? because for old augeas not trying to change if already change. "returns: executed successfully" Which version of Puppet are you using? Bug #11414 affected all Puppet when used with Augeas 0.10.0, which made the resources "run" on every single run, but never change things. http://projects.puppetlabs.com/issues/11414 This was fixed in Puppet 2.7.10, though I'd strongly recommend using 2.7.14 if you can (due to other bugs). It wasn't fixed in 2.6, though if you're using EPEL then there's a patch in that 2.6 RPM. -- 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.
Re: [Puppet Users] Puppet class not working after use augeas-0.10.0-3
On 04/05/12 04:57, heriyanto wrote: > Yes nice.. its work thank you Dominic, but its still execute even its > already changed its normal for new augeas? because for old augeas not > trying to change if already change. "returns: executed successfully" Which version of Puppet are you using? Bug #11414 affected all Puppet when used with Augeas 0.10.0, which made the resources "run" on every single run, but never change things. http://projects.puppetlabs.com/issues/11414 This was fixed in Puppet 2.7.10, though I'd strongly recommend using 2.7.14 if you can (due to other bugs). It wasn't fixed in 2.6, though if you're using EPEL then there's a patch in that 2.6 RPM. -- Dominic Cleal Red Hat Consulting m: +44 (0)7817 878113 -- 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.
Re: [Puppet Users] Puppet class not working after use augeas-0.10.0-3
Yes nice.. its work thank you Dominic, but its still execute even its already changed its normal for new augeas? because for old augeas not trying to change if already change. "returns: executed successfully" my onlyif doesn't work. onlyif => "match *[/files/etc/modprobe.conf[install = '$module /bin/true']] size == 0", and this script doesn't work anymore: if $ssh_port != '' { augeas { "ssh_port" : context => "/files/etc/ssh/sshd_config", changes => [ "set Port $ssh_port", ], notify => Service[ "sshd" ], } } Thank you for any help. Regards, On 05/01/2012 08:06 PM, Dominic Cleal wrote: On 01/05/12 13:00, heriyanto wrote: Hi , This my puppet class, working nicely. But after i upgarde augeas into augeas-0.10.0-3 There was an incompatible change to the modprobe lens in Augeas 0.10.0: "Modprobe: Parse commands in install/remove stanzas (this introduces a backwards incompatibility)" from http://augeas.net/news.html define modprobe::disableModule ( $module = '' ) { augeas::basic-change {"$name": file=> "/etc/modprobe.conf", lens=> "modprobe.lns", changes => "set install[0] '$module /bin/true'", onlyif => "match *[/files/etc/modprobe.conf[install = '$module /bin/true']] size == 0", } } The value of the node is no longer a concatenation of the module name and the command, the two were split up. Try this: define modprobe::disableModule ( $module = '' ) { augeas::basic-change {"$name": file=> "/etc/modprobe.conf", lens=> "modprobe.lns", changes => [ "set install[.='$module'] '$module'", "set install[.='$module']/command /bin/true", ], } } This creates two nodes instead of just the one, e.g. /files/etc/modprobe.conf/install = "foo" /files/etc/modprobe.conf/install/command = "/bin/true" I've also changed the install[0] so it doesn't always overwrite the first install line and instead creates an install line per module. Cheers, -- 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.
Re: [Puppet Users] Puppet class not working after use augeas-0.10.0-3
On 01/05/12 13:00, heriyanto wrote: > Hi , > > This my puppet class, working nicely. But after i upgarde augeas into > augeas-0.10.0-3 There was an incompatible change to the modprobe lens in Augeas 0.10.0: "Modprobe: Parse commands in install/remove stanzas (this introduces a backwards incompatibility)" from http://augeas.net/news.html > define modprobe::disableModule ( $module = '' ) > { > augeas::basic-change {"$name": > file=> "/etc/modprobe.conf", > lens=> "modprobe.lns", > changes => "set install[0] '$module /bin/true'", > onlyif => "match *[/files/etc/modprobe.conf[install = > '$module /bin/true']] size == 0", > } > } The value of the node is no longer a concatenation of the module name and the command, the two were split up. Try this: define modprobe::disableModule ( $module = '' ) { augeas::basic-change {"$name": file=> "/etc/modprobe.conf", lens=> "modprobe.lns", changes => [ "set install[.='$module'] '$module'", "set install[.='$module']/command /bin/true", ], } } This creates two nodes instead of just the one, e.g. /files/etc/modprobe.conf/install = "foo" /files/etc/modprobe.conf/install/command = "/bin/true" I've also changed the install[0] so it doesn't always overwrite the first install line and instead creates an install line per module. Cheers, -- Dominic Cleal Red Hat Consulting m: +44 (0)7817 878113 -- 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.