puppet/modules/redis/manifests/overcommit.pp @ 6b52e3b8fcd9

Fix puppet/redis.
author Steve Losh <steve@stevelosh.com>
date Tue, 04 Oct 2011 19:36:45 -0400
parents ead78c7e9a4d
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",
    }
  }
}