Puppet Class: redis::administration

Defined in:
manifests/administration.pp

Summary

Allows various administrative settings for Redis

Overview

As documented in the FAQ and redis.io/topics/admin. For disabling Transparent Huge Pages (THP), use separate module such as: forge.puppet.com/modules/alexharvey/disable_transparent_hugepage

Note that this class requires the herculesteam/augeasproviders_sysctl module.

Examples:

include redis::administration
class {'redis::administration':
  enable_overcommit_memory => false,
}

Parameters:

  • enable_overcommit_memory (Boolean) (defaults to: true)

    Enable the overcommit memory setting

  • somaxconn (Integer[0]) (defaults to: 65535)

    Set somaxconn value

See Also:

Author:

    • Peter Souter



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'manifests/administration.pp', line 25

class redis::administration (
  Boolean $enable_overcommit_memory = true,
  Integer[0] $somaxconn             = 65535,
) {
  if $enable_overcommit_memory {
    sysctl { 'vm.overcommit_memory':
      ensure => 'present',
      value  => '1',
    }
  }

  if $somaxconn > 0 {
    sysctl { 'net.core.somaxconn':
      ensure => 'present',
      value  => $somaxconn,
    }
  }
}