Skip to content

Latest commit

 

History

History
124 lines (107 loc) · 3.96 KB

README.md

File metadata and controls

124 lines (107 loc) · 3.96 KB

Puppet module for nscd

Build Status Release Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores puppetmodule.info docs Apache-2.0 License

Overview

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

Examples

Including the class should configure nscd with default OS configuration.

include nscd

A full set of configurations that can be set.

class { 'nscd':
  pkg_ensure => 'latest',
  service_ensure => true,
  service_enable => true,
  stat_user => 'nobody',
  threads   => 10,
  max_threads => 22,
  paranoia => true,
  restart_interval => 100,
  debug_level => 5,
  reload_count => 20,
  logfile => '/var/log/nscd_log.log',
  dbconfig => {
    'passwd' => {
      'enable-cache'          => true,
      'positive-time-to-live' => 100,
      'negative-time-to-live' => 23,
      'suggested-size'        => 1234567,
      'check-files'           => true,
      'persistent'            => true,
      'shared'                => true,
      'max-db-size'           => 12345678900,
      'auto-propagate'        => true,
    },
    'group' => {
      'enable-cache'          => true,
      'positive-time-to-live' => 100,
      'negative-time-to-live' => 23,
      'suggested-size'        => 1234567,
      'check-files'           => true,
      'persistent'            => true,
      'shared'                => true,
      'max-db-size'           => 12345678900,
      'auto-propagate'        => true,
    },
    'hosts' => {
      'enable-cache'          => true,
      'positive-time-to-live' => 100,
      'negative-time-to-live' => 23,
      'suggested-size'        => 1234567,
      'check-files'           => true,
      'persistent'            => true,
      'shared'                => true,
      'max-db-size'           => 12345678900,
      'auto-propagate'        => true,
    },
  'services' => {
    'enable-cache'          => true,
    'positive-time-to-live' => 100,
    'negative-time-to-live' => 23,
    'suggested-size'        => 1234567,
    'check-files'           => true,
    'persistent'            => true,
    'shared'                => true,
    'max-db-size'           => 12345678900,
    'auto-propagate'        => true,
  },
  'netgroup' => {
    'enable-cache'          => true,
    'positive-time-to-live' => 100,
    'negative-time-to-live' => 23,
    'suggested-size'        => 1234567,
    'check-files'           => true,
    'persistent'            => true,
    'shared'                => true,
    'max-db-size'           => 12345678900,
    'auto-propagate'        => true,
    },
  },
}

The only compulsory key per database is enable-cache. If false also subsequent keys for that database will be ignored.

The dbconfig parameter is configured with a lookup_option of a deep merge. So particular settings can be appended or overridden from hiera.

nscd::dbconfig:
  netgroup:
    check-files: false
  services:
    enable-cache: false

Usage

Generated puppet strings documentation with examples is available from REFERENCE.md

Authors