Resource Type: init_ulimit

Defined in:
lib/puppet/type/init_ulimit.rb
Providers:
sysv
systemd

Overview

Please use the “systemd“ module for systems that support “systemd“

Update “ulimit“ settings in init scripts.

The resource name does have to be unique but is meaningless.

Valid “limit_type“ names are:

* b|socket_buffer_size
* c|max_core_size
* d|max_data_segment
* e|max_nice
* f|max_file_size
* i|max_pending_signals
* l|max_memory_lock_size
* m|max_resident_set_size
* n|max_open_files (default)
* p|max_queue_size
* r|max_real_time_pri
* s|max_stack_size
* t|max_cpu_time
* u|max_num_procs
* v|max_virt_memory
* x|max_file_locks
* T|max_threads

All of these are explained in the “ulimit“ section of “bash_builtins(1)“

The parameter names are taken from the descriptive field names used in “limits.conf“.

Examples:

Long Names


init_ulimit { 'rsyslog':
  ensure     => 'present',
  limit_type => 'both'
  item       => 'max_open_files',
  value      => 'unlimited'
}

Short Names


init_ulimit { 'rsyslog':
  item       => 'n',
  value      => 'unlimited'
}

Properties

  • ensure (defaults to: present)

    The basic property that the resource should be in.

    Supported values:
    • present
    • absent
  • value

    The value to which to set the new limit.

    Supported values:
    • hard
    • soft
    • unlimited
    • /^\d+$/

Parameters

  • item (namevar) (defaults to: max_open_files)

    The system limit resource to modify

  • limit_type (defaults to: both)

    The limit type: hard|soft|both

    Supported values:
    • soft
    • hard
    • both
  • name

    A unique name for the resource

  • provider

    The specific backend to use for this ‘init_ulimit` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

  • target (namevar)

    The service that will be modified. If you specify a full path, that will be used instead.