Yeah I've currently got a mounttab block that controls just / and /var, but 
I'd kind of like to have it run on *any* filesystem that is xfs and mounted 
in a VM.

This augeas works for single filesystems:

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

But if I remove the [file="/var"] then it fails.

But I do have a sort of working solution now.

On Tuesday, March 24, 2015 at 8:34:32 AM UTC-4, Ryan Anderson wrote:
>
> You really ought to try using the 'mount' resource type: 
> http://docs.puppetlabs.com/references/latest/type.html#mount
>
> The native type already knows about /etc/fstab format and is far more 
> cross-platform and simple to use than augeas.
>

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/f4568848-21b6-4ea2-a2ad-cb5b4831bb82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to