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 [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.

Reply via email to