From 32658b9d3b4d0a58459c2fa83a7594bf98676acd Mon Sep 17 00:00:00 2001 From: Guillaume Grossetie Date: Tue, 1 Dec 2015 14:22:25 +0100 Subject: [PATCH] Resolves #1312, Improve pam_limits documentation Adds comment parameter and improve examples. --- system/pam_limits.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/system/pam_limits.py b/system/pam_limits.py index 4003f76d3f8..e14408fb4e2 100644 --- a/system/pam_limits.py +++ b/system/pam_limits.py @@ -78,14 +78,22 @@ options: - Modify the limits.conf path. required: false default: "/etc/security/limits.conf" + comment: + description: + - Comment associated with the limit. + required: false + default: '' ''' EXAMPLES = ''' -# Add or modify limits for the user joe +# Add or modify nofile soft limit for the user joe - pam_limits: domain=joe limit_type=soft limit_item=nofile value=64000 -# Add or modify limits for the user joe. Keep or set the maximal value -- pam_limits: domain=joe limit_type=soft limit_item=nofile value=1000000 +# Add or modify fsize hard limit for the user smith. Keep or set the maximal value. +- pam_limits: domain=smith limit_type=hard limit_item=fsize value=1000000 use_max=yes + +# Add or modify memlock, both soft and hard, limit for the user james with a comment. +- pam_limits: domain=james limit_type=- limit_item=memlock value=unlimited comment="unlimited memory lock for james" ''' def main():