Skip to content

Instantly share code, notes, and snippets.

@dky
Last active December 11, 2015 11:48
Show Gist options
  • Save dky/4595997 to your computer and use it in GitHub Desktop.
Save dky/4595997 to your computer and use it in GitHub Desktop.
Puppet exec code to edit fstab only if acl support doesn't already exist.
exec { "add_fstab_acl":
command => "/bin/sed -i.backup '/srv/s/defaults/defaults,acl/g' /etc/fstab",
unless => "/bin/grep -E '/srv.*ext4.*defaults,acl' /etc/fstab",
path => "/usr/local/bin/:/bin/",
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment