Skip to content

Instantly share code, notes, and snippets.

@greglarkin
Last active October 21, 2015 13:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greglarkin/8507e415f15f0a26ef29 to your computer and use it in GitHub Desktop.
Save greglarkin/8507e415f15f0a26ef29 to your computer and use it in GitHub Desktop.
class systest (
$sysctl_hash = undef,
) {
if $sysctl_hash {
validate_hash($sysctl_hash)
$sysctl_hash.each |$sysctl_name, $sysctl_attrs| {
validate_hash($sysctl_attrs)
sysctl { $sysctl_name:
ensure => $sysctl_attrs['ensure'],
permanent => $sysctl_attrs['permanent'],
value => $sysctl_attrs['value'],
}
}
}
}
class { 'systest':
sysctl_hash => {
'kernel.core_uses_pid' => {
'ensure' => 'present',
'permanent' => 'true',
'value' => '0',
},
'fs.suid_dumpable' => {
'ensure' => 'present',
'permanent' => 'true',
'value' => '2',
}
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment