puppet/modules/redis/manifests/overcommit.pp @ ead78c7e9a4d

This is why I drink.
author Steve Losh <steve@stevelosh.com>
date Wed, 28 Sep 2011 23:28:56 -0400
parents (none)
children (none)
class redis::overcommit($ensure=present) {

  file { "/etc/sysctl.d/overcommit.conf":
    ensure => $ensure,
    content => "vm.overcommit_memory=1",
  }

  if $ensure == "present" {
    exec { "overcommit-memory":
      command => "sysctl vm.overcommit_memory=1",
      unless => "test `sysctl -n vm.overcommit_memory` = 1",
    }
  }
}