SaltStack formula for setting user limits in PAM module
The pam_limits.so module applies ulimit limits, nice priority and number of simultaneous login sessions limit to user login sessions. This description of the configuration file syntax applies to the /etc/security/limits.conf file and *.conf files in the /etc/security/limits.d directory.
The Travis CI tests run the state on a Ubuntu server. By running the state it checks that there is no syntax errors and that it works for Ubuntu. Other operating systems are NOT tested therefore have a risk of not working on them. ServerSpec is used to verify that the state installed the proper packages and created limits.conf with the proper owner, group, mode and settings.
limits:
users:
johndoe:
- limit_type: hard
limit_item: core
limit_value: unlimited
- limit_type: hard
limit_item: nproc
limit_value: 1000
janedoe:
- limit_type: hard
limit_item: locks
limit_value: 300
groups:
employees:
- limit_type: hard
limit_item: cpu
limit_value: 5
- limit_type: hard
limit_item: nproc
limit_value: 500
http://linux.die.net/man/5/limits.conf
- Debian
- Ubuntu
- Centos
- Fedora
- RedHat
- Amazon
- Gentoo
- Mint
- SUSE
- danoe
- tampakrap
- cboltz