Hi there,

I'm trying to add the nobarrier option to our XFS mount options in 
/etc/fstab using Augeas.  I've tried this:

augeas { 'fstabxfsnobarrier': context => '/files/etc/fstab', changes => [ 
'rm /*[vfstype="xfs"]/opt', 'ins opt after vfstype="xfs"', 'set 
/*[vfstype="xfs"]/opt[last()] "defaults"', 'ins opt after vfstype="xfs"', 
'set /*[vfstype="xfs"]/opt[last()] "nobarrier"', ], }

But that isn't working. Now in the past I've done something similar with 
ext4 and /var, which does work:

if defined(Package['mysql55-server']) { augeas { 'fstabvarext4entry': 
context => '/files/etc/fstab/*[file="/var"][vfstype="ext4"]', changes => [ 
'rm opt', 'ins opt after vfstype[last()]', 'set opt[last()] "defaults"', 
'ins opt after opt[last()]', 'set opt[last()] "noatime"', 'ins opt after 
opt[last()]', 'set opt[last()] "data"', 'set opt[last()]/value 
"writeback"', 'ins opt after opt[last()]', 'set opt[last()] "barrier"', 
'set opt[last()]/value "0"', 'ins opt after opt[last()]', 'set opt[last()] 
"nobh"', 'ins opt after opt[last()]', 'set opt[last()] "errors"', 'set 
opt[last()]/value "remount-ro"', ], } }

Can Augeas only edit one line at a time, i.e. am I not allowed to do "add 
this option to every matching line"?

Any help would be greatly appreciated!

Anthony

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b35760e2-37d6-4d07-9c2d-b0cecd2c05bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to