On Fri, 2009-05-15 at 14:41 -0400, Rob McBroom wrote: > However, what seems like a majority of files are broken up into an > "array" of values. Take the `/etc/exports` [example from the wiki][1]. > Existing items are assigned numbers 1-4 by Augeas when the file is > loaded.
I should have looked at the way /etc/exports is mapped before my last reply - because there, the entries aren't really numbered. In the tree you just have a list of 'dir' nodes underneath /files/etc/exports - the notation dir[1], dir[2], ... is only used to disambiguate those nodes, but the '[1]' etc. are not really part of the node name, and you can indeed force a new one to be created by saying set /files/etc/exports/dir[last() + 1] /myexport set /files/etc/exports/dir[last()]/client 192.168.0.0/24 .... Note that the first 'set' creates a new 'dir' node (since there can never be a node with index last() + 1), but once that node is created it's referenced as dir[last()] David --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---