From 3a4b6b1d12f24bd8c4ed2b0a9f076854f9dca3d2 Mon Sep 17 00:00:00 2001 From: Timo Sand Date: Thu, 2 Aug 2018 09:23:46 +0200 Subject: [PATCH] Adds example of using wildcard domain in pam_limits (#43391) * Adds example of using wildcard domain * Fixes W293 * Slight formatting changes on the examples --- lib/ansible/modules/system/pam_limits.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/ansible/modules/system/pam_limits.py b/lib/ansible/modules/system/pam_limits.py index 560f5a069a..1ac460349a 100644 --- a/lib/ansible/modules/system/pam_limits.py +++ b/lib/ansible/modules/system/pam_limits.py @@ -99,28 +99,35 @@ notes: ''' EXAMPLES = ''' -# Add or modify nofile soft limit for the user joe -- pam_limits: +- name: 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 fsize hard limit for the user smith. Keep or set the maximal value. -- pam_limits: +- name: 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: +- name: 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 + +- name: Add or modify hard nofile limits for wildcard domain + pam_limits: + domain: '*' + limit_type: hard + limit_item: nofile + value: 39693561 ''' import os