From af12e6d3a38a05579181353b2ed222068cab59e8 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. --- lib/ansible/modules/extras/system/pam_limits.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/extras/system/pam_limits.py b/lib/ansible/modules/extras/system/pam_limits.py index 8d151f8aa4..efc3301d11 100644 --- a/lib/ansible/modules/extras/system/pam_limits.py +++ b/lib/ansible/modules/extras/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():