On Mon, May 18, 2009 at 9:01 AM, Rob McBroom <mailingli...@skurfer.com>wrote:
> > On 2009-May-16, at 12:42 PM, Brent Chapman wrote: > > > If your goal is to append something to an Augeas list, then I think > > it's much better to use the [last()+1] notation. > > There are a couple of problems with that. Using last() is a better > method as far as general Augeas technique goes, but it doesn't address > the problem with using Augeas in Puppet. Also, the last() function > only seems to be available for labels with multiple values. It doesn't > seem to work for things like /etc/inittab or /etc/hosts where the > numbers assigned represent lines in the file. For instance: > > augtool> ls /files/etc/inittab/last() The correct syntax in this case would be: augtool> ls /files/etc/inittab/*[last()] id = x runlevels = 5 action = respawn process = /etc/X11/prefdm -nodaemon -Brent -- Brent Chapman <br...@netomata.com> Founder and CEO // Netomata, Inc. // www.netomata.com Making networks more reliable and flexible by automating network configuration --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---