Skip to content

Instantly share code, notes, and snippets.

@raphink
Last active August 29, 2015 13:57
Show Gist options
  • Save raphink/9619754 to your computer and use it in GitHub Desktop.
Save raphink/9619754 to your computer and use it in GitHub Desktop.
$maxmem = 1024*0.6*$memorysize_mb
augeas { "sysctl_conf":
context => "/files/etc/sysctl.conf",
changes => [
"set kernel.shmmax ${maxmem}"
],
}
exec { "sysctl_conf_reload":
subscribe => Augeas[sysctl_conf],
refreshonly => true,
command => "/sbin/sysctl -p",
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment