This module installs, configures and manages the service of nscd.
To use this class, you need only interact with the nscd
class. It supports
parameterized class, as well as via Hiera key/values in versions 2.7+ of Puppet.
Class parameters always follow the convention ${service}_${setting}
, where
${service}
is one of the cache (service) names. ${setting}
is the
cache setting name, with the dash (-
) character replaced with the
underscore character (_
).
Hiera keys follow the same convention as above, except being located in the
nscd
namespace. For example, the parameter netgroup_enable_cache
would be the Hiera key nscd::netgroup_enable_cache
.
In addition, the following Hiera keys are available for use to control the nscd service.
-
service_enable
: <true|false|undef> : If set to true, the service is set to be enabled at boot time. If false, the service is disabled at boot. If set to undef, the boot state is not managed by Puppet. -
service_ensure
: <running|stopped|undef> : If set to running, state of service is ensured to be running. Likewise for stopped, service is ensured to be stopped. undef will prevent Puppet from managing the service state.
note: Refactoring of the code to make these class parameters is on the radar, but likely not to happen unless someone asks for it. Pull requests happily accepted.
The following services are supported:
passwd
: the passwd (/etc/passwd) service cachegroup
: the group (/etc/group) service cachehosts
: the hosts (/etc/hosts) service cacheservices
: the services (/etc/services) service cachenetgroup
: the netgroup (/etc/netgroup) service cache
The following settings are supported for each service. If left unspecified, the a parameter value will default to the settings of your distributions default config.
enable_cache
: <yes|no> : turn the cache.positive_time_to_live
: <integer> : ttl of positive cache entries.negative_time_to_live
: <integer> : ttl of negative cache entries.suggested_size
: <integer> : internal hash table size. should be a prime number.check_files
: <yes|no> : check the local service file for changes.persistent
: <yes|no> : retain the database across server restarts.shared
: <yes|no> : provide direct memory access for a service's database.max_db_size
: <integer> : maximum size (in bytes) of the db file.auto-propagate
<yes|no> : (passwd and group only) when set tono
, byname requests are not add to the byuid and bygid caches.
# in manifest
include nscd
# in hiera
---
nscd::service_ensure: 'undef'
nscd::passwd_check_files: no
nscd::services_max_db_size: 102400
nscd::netgroup_enable_cache: no
class { 'nscd':
passwd_positive_time_to_live = 600,
passwd_negative_time_to_live = 300,
service_ensure => 'undef',
netgroup_enable_cache = 'no',
}
See LICENSE file
Copyright © 2014 The Regents of the University of California
Aaron Russo arusso@berkeley.edu
Please log tickets and issues at the Projects site