augtool> ins + after /files/etc/group/*[last()] augtool> set /files/etc/group/+/password : augtool> set /files/etc/group/+/gid : augtool> set /files/etc/group/+/user : augtool> save Saving failed augtool> print /augeas/files/etc/group/error /augeas/files/etc/group/error = "put_failed" /augeas/files/etc/group/error/path = "/files/etc/group(root)" /augeas/files/etc/group/error/lens = "/usr/share/augeas/lenses/dist/group.aug:43.17-.40" /augeas/files/etc/group/error/message = "Short iteration"
So, clearly augeas is unhappy. Lens excerpts: let word = /[A-Za-z0-9][A-Za-z0-9_.-]*/ let user = [ label "user" . store word ] let user_list = Build.opt_list user comma let params = [ label "password" . store word . colon ] . [ label "gid" . store integer . colon ] . user_list? let entry = Build.key_value_line word colon params So it looks like gid needs to be an integer and you can't use + as a word. augtool> ins foo after /files/etc/group/*[last()] augtool> set /files/etc/group/foo/password bar augtool> set /files/etc/group/foo/gid 12345 augtool> set /files/etc/group/foo/user[0] baz augtool> set /files/etc/group/foo/user[0] quux augtool> print /files/etc/group/foo Saved 1 file(s) Hope this helps. -- 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.