Skip to content

Latest commit

 

History

History
212 lines (125 loc) · 4.56 KB

File metadata and controls

212 lines (125 loc) · 4.56 KB

Reference

Table of Contents

Classes

  • limits: Manage user and group limits via Puppet

Defined types

Classes

limits

== Class: limits This module manages the limits of the PAM module pam_limits.

Examples

include limits

Parameters

The following parameters are available in the limits class:

limits_dir

Data type: String[1]

Directory for individual limits config files

manage_limits_d_dir

Data type: Boolean

Manage $limits_dir itself

purge_limits_d_dir

Data type: Boolean

Purge $limits_dir

limits_file

Data type: String[1]

Basic limits configuration file

manage_limits_file

Data type: Boolean

Manage $limits_file

limits_file_owner

Data type: String[1]

Owner of $limits_file

limits_file_group

Data type: String[1]

Group $limits_file

limits_file_mode

Data type: String[1]

Mode $limits_file

limits_template

Data type: String[1]

Name of the template to use for $limits_file

entries

Data type: Optional[Hash[String[1], Hash[Pattern[/\A[a-z][a-z0-9_]*\Z/], Data], 1]]

limits configuration file(s) entries

Defined types

limits::limits

This defined type creates individual limit configuration files in the limits.d directory. The title should be of the form user/limit_type if $user and $limit_type are not provided separately.

Examples

Setting file descriptor limits for all users
limits::limits{'*/nofile':
  hard => 12345,
  soft => 123,
}
Setting limits using both parameter
limits::limits{'root/nofile':
  both => 1234,
}
Multiple settings in single file
limits::limits{'root/nofile':
  both => 1234,
  target => '01-root.conf',
}
limits::limits{'root/nproc':
  both => 1234,
  target => '01-root.conf',
}

Parameters

The following parameters are available in the limits::limits defined type:

ensure

Data type: Enum['absent', 'present']

Whether the limit configuration should be present or absent

Default value: present

user

Data type: Optional[String[1]]

The user or group name to apply limits to. If not specified, extracted from title

Default value: undef

limit_type

Data type: Optional[String[1]]

The type of limit to set (e.g., 'nofile', 'nproc', 'core'). If not specified, extracted from title

Default value: undef

hard

Data type: Optional[Variant[Integer, String]]

The hard limit value

Default value: undef

soft

Data type: Optional[Variant[Integer, String]]

The soft limit value

Default value: undef

both

Data type: Optional[Variant[Integer, String]]

Set both hard and soft limits to the same value (uses '-' in limits file)

Default value: undef

target

Data type: Optional[String[1]]

Name of file in limits::limits_dir directory where settings will be applied. If provided, title with .conf extension will not be used as target file.

Default value: undef