Giter Club home page Giter Club logo

puppet-limits's Introduction

Unmaintained

I no longer use Puppet actively and this software has not been maintained for some time.

puppet-limits

Puppet module to set entries in /etc/security/limits.conf

limits

The recommended usage is to place the configuration under a limits hash in hiera and just include the limits module in your puppet configuration:

include limits

Example hiera config:

limits:
  '*':
    nofile:
      soft: '2048'
      hard: '8192'
    nproc:
      soft: '20'
      hard: '20'
  'myuser':
    nofile:
      soft: '4068'
      hard: '8192'
  '@mygroup':
    nproc:
      hard: '50'

This example creates the following entries in /etc/security/limits.conf:

* nofile soft 2048
* nofile hard 8192
myuser nofile soft 4068
myuser nofile hard 8192
* nproc soft 20
* nproc hard 20
@mygroup nproc hard 50

replacing any existing items in the same domain.

You can also call it as a parameterised class passing in the configuration data as a hash - for example:

class { 'limits':
  config => {
    '*' => {
      'nofile' => {
        soft => '2048',
        hard => '8192',
      },
      'nproc' => {
        soft => '20',
        hard => '20',
      },
    },
    '@mygroup' => {
      'nproc' => {
        hard => '50',
      }
    },
  },
  use_hiera => false,
}

Parameters

Each entry title is the domain name - for example '*' for all users, '@wheel' for members of the wheel group, 'root' for the root user etc.

For each domain there is one or more items: one of: 'core', 'data', 'fsize', 'memlock', 'nofile', 'rss', 'stack', 'cpu', 'nproc', 'as', 'maxlogins', 'maxsyslogins', 'priority', 'locks', 'sigpending', 'msqqueue', 'nice', 'rtprio'.

For each item the following parameters are accepted:

  • soft: the item's soft limit. Optional.

  • hard: the item's hard limit. Optional.

See the limits.conf(5) man page for more information.

Implementation based on https://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Augeas

puppet-limits's People

Contributors

erwbgy avatar v14r avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

puppet-limits's Issues

order matters in the limits.conf

Hello, I used your module and got a limits.conf that looks like this:

root soft nproc unlimited
* soft nproc 1024

If i'm not mistaken this would set root's limit to 1024; which is undesired.

Have a good day.

-Shawn

missing tag 0.3.1 - exists on forge

We're moving our Puppetfile from the forge to git sources, and the tagging has some discrepancies here.

0.3.1 exists on the forge, but not here. The latest changelog here is for 0.3.0 as well.

Is it possible to get the 0.3.1 tag pushed up?

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.