pam_limits

Collection: community.general

Full Name: parallax.community.general.pam_limits

Aliases: community.general.pam_limits, pam_limits

Synopsis

Manage entries in limits.conf

Parameters

NameTypeRequiredDefaultDescription
domainstringyesA username, @groupname, wildcard, UID/GID range
limit_typestringyesLimit type: hard, soft, or - (both)
limit_itemstringyesThe limit item (e.g. nofile, nproc, core)
valuestringyesThe value of the limit
deststring/etc/security/limits.confPath to the limits.conf file
backupboolfalseCreate a backup file before editing
use_maxboolfalseIf set, only change the value if it is higher than the current value
use_minboolfalseIf set, only change the value if it is lower than the current value
commentstringComment associated with the limit

Example

- name: Raise the open file limit for the app user
  pam_limits:
    domain: app
    limit_type: soft
    limit_item: nofile
    value: "65536"
    backup: true