Forge Home

limits

Manages /etc/security/limits.d/ config files

1,119 downloads

1,119 latest version

3.1 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.0 (latest)
released Jun 9th 2021
This version is compatible with:
  • Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
  • Puppet >= 6.21.0 < 8.0.0
  • , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'arden-limits', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add arden-limits
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install arden-limits --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

arden/limits — version 0.1.0 Jun 9th 2021

limits

pipeline status Version coverage report

Table of Contents

  1. Description
  2. Setup - The basics of getting started with limits
  3. Limitations - OS compatibility, etc.
  4. Development - Guide for contributing to the module

Description

This module allows the creation of one or more limits.conf format files within /etc/security/limits.d/ on the target node. These can be declared individually or via the class itself.

Setup

What limits affects

Simply creates limits entries as specified within the target directory.

Setup Requirements

You'll need puppetlabs/stdlib.

Beginning with limits

The following yaml config defines two limits entries:

limits::array_limits:
  sequence: '10',
  header_comment:
    - 'Prevents errors when higher pipeline loads execute.'
    - 'See https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438367/Installing+a+Snaplex+on+Linux'
  entries:
    snapuser:
      - item: nproc
        type: soft
        value: 8192
      - item: nproc
        type: hard
        value: 65536
      - item: nofile
        type: soft
        value: 8192
      - item: nofile
        type: hard
        value: 65536
  sap_base:
    sequence: '10'
    header_comment:
      - 'See the RHEL7 master note https://launchpad.support.sap.com/#/notes/2002167 for detail'
      - 'Note that this may handle Oracle requirements as well'
    entries:
      '@sapsys':
         - item: nproc
           type: soft
           value: unlimited
         - item: nofile
           type: both
           value: 65536
      '@sdba':
         - item: nofile
           type: both
           value: 32800
      '@dba':
         - item: nofile
           type: both
           value: 32800

The following puppet code declares the same limits entries detailed above directly.

limits::file { 'snaplogic_limits':
  sequence       => '10',
  header_comment => [
    'Prevents errors when higher pipeline loads execute.',
    'See https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438367/Installing+a+Snaplex+on+Linux',
  ],
  entries        => {
    'snapuser' => [
      {
        'item'  => 'nproc',
        'type'  => 'soft',
        'value' => '8192',
      },
      {
        'item'  => 'nproc',
        'type'  => 'hard',
        'value' => '65536',
      },
      {
        'item'  => 'nofile',
        'type'  => 'soft',
        'value' => '8192',
      },
      {
        'item'  => 'nofile',
        'type'  => 'hard',
        'value' => '65536',
      },
    ],
  },
}

limits::file { 'sap_base':
  sequence       => '10',
  header_comment => [
    'See the RHEL7 master note https://launchpad.support.sap.com/#/notes/2002167 for detail',
    'Note that this may handle Oracle requirements as well',
  ],
  entries        => {
    '@sapsys' => [
      {
        'item' => 'nproc',
        'type' => 'soft',
        'value' => 'unlimited',
      },
      {
        'item' => 'nofile',
        'type' => 'both',
        'value' => '65536',
      },
    ],
    '@sdba' => [
      {
        'item' => 'nofile',
        'type' => 'both',
        'value' => '32800',
      },
    ],
    '@dba' => [
      {
        'item' => 'nofile',
        'type' => 'both',
        'value' => '32800',
      },
    ],
  },
},

Limitations

Note that while the 'items' are restricted to valid names no validation is performed on their values.

Development

Make a pull request and we'll figure it out!