Puppet Class: nscd

Defined in:
manifests/init.pp

Summary

Configures /etc/ncsd.conf and controls nscd service.

Overview

nscd class.

Note for each database at least the ‘enable-cache` key must be specified.

Examples:

class{'nscd':
  dbconfigs  => {
    'passwd' => {'enable-cache'         => true,
                 'maximum-time-to-live' => 100,
                 },
    'group' => {'enable-cache'         => true,
                'maximum-time-to-live' => 100,
               },

  }

Parameters:

  • pkg_ensure (Enum['present','absent','latest']) (defaults to: 'present')

    state of nscd package.

  • service_ensure (Boolean) (defaults to: true)

    state of nscd service ensure

  • service_enable (Boolean) (defaults to: true)

    state of nscd service enable

  • threads (Integer) (defaults to: 5)

    number of threads.

  • max_threads (Integer) (defaults to: 32)

    maximum number of threads.

  • paranoia (Boolean) (defaults to: false)

    enable internal restart mode.

  • restart_interval (Optional[Integer]) (defaults to: undef)

    nscd internal restart interval

  • user (String[1]) (defaults to: 'root')

    specify which user should run nscd

  • stat_user (Optional[String[1]]) (defaults to: undef)

    which users can query statistics

  • debug_level (Integer) (defaults to: 0)

    debug level

  • reload_count (Integer) (defaults to: 5)

    any many reload attempts to make

  • logfile (Optional[Stdlib::UnixPath]) (defaults to: undef)

    specify a debug log file location.

  • dbconfig (Nscd::Database)

    configuration for each of the passwd, group, hosts and service database.



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'manifests/init.pp', line 34

class nscd (
  Nscd::Database                    $dbconfig,
  Enum['present','absent','latest'] $pkg_ensure       = 'present',
  Boolean                           $service_ensure   = true,
  Boolean                           $service_enable   = true,
  String[1]                         $user             = 'root',
  Optional[String[1]]               $stat_user     = undef,
  Integer                           $threads          = 5,
  Integer                           $max_threads      = 32,
  Boolean                           $paranoia         = false,
  Optional[Integer]                 $restart_interval = undef,
  Integer                           $debug_level      = 0,
  Integer                           $reload_count     = 5,
  Optional[Stdlib::UnixPath]        $logfile          = undef,
) {
  contain nscd::install
  contain nscd::config
  contain nscd::service

  Class['nscd::install']
  -> Class['nscd::config']
  ~> Class['nscd::service']
}