Created
August 9, 2014 16:55
-
-
Save andrewkroh/acc06c3f5490c93d95f6 to your computer and use it in GitHub Desktop.
Configuring /etc/fstab with Puppet Augeas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
augeas{ '/etc/fstab - nosuid on /sys': | |
context => "/files/etc/fstab", | |
changes => [ | |
"ins opt after /files/etc/fstab/*[file = '/sys']/opt[last()]", | |
"set *[file = '/sys']/opt[last()] nosuid", | |
], | |
onlyif => "match *[file = '/sys']/opt[. = 'nosuid'] size == 0", | |
} | |
augeas{ '/etc/fstab - acl on /sys': | |
context => "/files/etc/fstab", | |
changes => [ | |
"ins opt after /files/etc/fstab/*[file = '/sys']/opt[last()]", | |
"set *[file = '/sys']/opt[last()] acl", | |
], | |
onlyif => "match *[file = '/sys']/opt[. = 'acl'] size == 0", | |
} | |
augeas{ '/etc/fstab - nosuid on /boot': | |
context => "/files/etc/fstab", | |
changes => [ | |
"ins opt after /files/etc/fstab/*[file = '/boot']/opt[last()]", | |
"set *[file = '/boot']/opt[last()] nosuid", | |
], | |
onlyif => "match *[file = '/boot']/opt[. = 'nosuid'] size == 0", | |
} | |
augeas{ '/etc/fstab - acl on /boot': | |
context => "/files/etc/fstab", | |
changes => [ | |
"ins opt after /files/etc/fstab/*[file = '/boot']/opt[last()]", | |
"set *[file = '/boot']/opt[last()] acl", | |
], | |
onlyif => "match *[file = '/boot']/opt[. = 'acl'] size == 0", | |
} | |
augeas{ '/etc/fstab - nodev on /boot': | |
context => "/files/etc/fstab", | |
changes => [ | |
"ins opt after /files/etc/fstab/*[file = '/boot']/opt[last()]", | |
"set *[file = '/boot']/opt[last()] nodev", | |
], | |
onlyif => "match *[file = '/boot']/opt[. = 'nodev'] size == 0", | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment