Code Monkey home page Code Monkey logo

puppet-nscd's Introduction

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

puppet-nscd's People

Contributors

alexjfisher avatar arnisoph avatar bascht avatar bastelfreak avatar bendylan avatar dhoppe avatar ekohl avatar jcpunk avatar juniorsysadmin avatar kenyon avatar llowder avatar mapfatdm avatar martinpfeifer avatar maxadamo avatar sagiru avatar sandra-thieme avatar simonhoenscheid avatar smortex avatar traylenator avatar wyardley avatar zilchms avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-nscd's Issues

Dependency is incorrectly listed

In the metadata.json you see:

  "dependencies": [
    {
      "name": "puppetlabs-stdlib",
      "version_requirement": ">= 4.13.1 < 9.0.0"
    }
  ],

The name of the module is incorrect. It should be "puppetlabs/stdlib" with a slash.

Failed to install module with librarian-puppet

Module cannot be installed with librarian-puppet because the metadata.json fails validation.
version_requirement string in metadata.json contains 2 spaces between operator & version, which make validation fails:

{
//..
  "dependencies": [
    {
      "name": "puppetlabs-stdlib",
      "version_requirement": ">=  4.13.1 < 6.0.0"
    }
  ],
//...
}

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.10.10
  • Ruby: 2.1.0
  • Distribution: Centos 7
  • Module version: 1.0.0

How to reproduce (e.g Puppet code you use)

  • Create a Puppetfile
mod 'puppet-nscd'
  • run librarian-puppet install

What are you seeing

Librarian puppet fails

What behaviour did you expect instead

Librarian succeeds & module is installed.

Output log

# ...
puppetdev.jouve.com: [Librarian]     Checking puppet-nscd/1.0.0 <http://vm-puppet-srv.intra.jouve.com>
 puppetdev.jouve.com: /opt/puppetlabs/puppet/lib/ruby/2.1.0/rubygems/requirement.rb:86:in `parse': Illformed requirement [">=  4.13.1 < 6.0.0"] (Gem::Requirement::BadRequirementError)
#...

The module should allow all global and per-service properties to be managed

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: all
  • Ruby: all
  • Distribution: all
  • Module version: 1.0.0

What are you seeing

The module supports customization of only a few of nscd's configuration properties. All others are assigned hardcoded values.

What behaviour did you expect instead

The module should provide means to manage substantially all nscd configuration properties -- both global and service-specific -- to user-chosen values.

Add puppet 4 data types

This would be preferable to

if ! ( $pkg_ensure in ['present','absent','latest'] ) {
    fail('pkg_ensure must be present, absent or latest')
  }

New release?

I realize that we can pull this from git, but would you mind pushing a new release with the changes from 11 months ago? :)

Thanks in advance,
Tommy

3.0.0 Release Summary

Version 3 is a new major version of puppet/nscd. For most use cases, it is backwards incompatible and users will need to modify their declarations of the nscd class.

The previous parameters such as

  • passwd_positive_ttl positive time to live for passwords database.
  • passwd_negative_ttl negative time to live for passwords database.
  • enable_passwd enable password cache.
  • ....

are now all removed and instead all database parameters are specified with the
dbconfig parameter. e.g.

class{'nscd':
  dbconfig => {
    'passwd' => {
      'enable-cache' => true,
      'positive-time-to-live' => 500,
      'negative-time-to-live' => 500,
     },
    'group' => {
      'enable-cache' => true,
      'positive-time-to-live' => 500,
      'negative-time-to-live' => 500,
     },
  },
}

The advantage of this breaking change that profits from newer puppet features is the module is much easier to maintain especially with respect to multiple OSes

Allow booleans for yes|no parameters

Obviously these would still need to be rendered as 'yes' or 'no' in the template.
Perhaps even consider a breaking change and allowing only booleans?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.