On Tue, Jun 9, 2009 at 11:16 AM, Bryan Kearney <bkear...@redhat.com> wrote:

>
> lance dillon wrote:
> > I need to be able to add:
> >
> > alias usb-storage off
> >
> > to /etc/modprobe.conf
> >
> > I have this so far:
> >
> >   augeas { "usb-storage":
> >     context => "/files/etc/modprobe.conf",
> >     changes => [ "set alias[last()+1] usb-storage",
> >                  "set alias[last()]/modulename off",
> >                ],
> >     onlyif => "get alias != usb-storage"
> >   }
>
>
> try onlyif => "match alias include usb-storage"
>
> it may be
>
> "match alias[*] include usb-storage"
>
> -- bk
>
>
> Hmm, that didn't quite do it either.  Now it doesn't run regardless.  It is
supposed to add that line if usb-storage doesn't exist, and ignore if it
does (I don't want to add it multiple times).  The logic above seems to be
the opposite, but either way, nothing happened.

Thanks for the info though.  Now I have another command to check with (using
include).

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to