diff --git a/lib/ansible/modules/system/pam_limits.py b/lib/ansible/modules/system/pam_limits.py index 560f5a069a1..1ac460349a3 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