mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Add module documentation for git, group, service, and user
This commit is contained in:
87
library/user
87
library/user
@@ -18,6 +18,93 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: user
|
||||
author: Stephen Fromm
|
||||
version_added: 0.0.2
|
||||
short_description: Manage user accounts
|
||||
requirements: [ useradd, userdel, usermod ]
|
||||
description:
|
||||
- Manage user accounts and user attributes.
|
||||
options:
|
||||
name:
|
||||
required: true
|
||||
description:
|
||||
- Name of the user to create, remove or modify.
|
||||
comment:
|
||||
required: false
|
||||
description:
|
||||
- Optionally sets the description (aka I(GECOS)) of user account.
|
||||
uid:
|
||||
required: false
|
||||
description:
|
||||
- Optionally sets the I(UID) of the user.
|
||||
group:
|
||||
required: false
|
||||
description:
|
||||
- Optionally sets the user's primary group (takes a group name).
|
||||
groups:
|
||||
required: false
|
||||
description:
|
||||
- Puts the user in this comma-delimited list of groups.
|
||||
append:
|
||||
required: false
|
||||
description:
|
||||
- If I(yes), will only add groups, not set them to just the list
|
||||
in I(groups).
|
||||
shell:
|
||||
required: false
|
||||
description:
|
||||
- Optionally set the user's shell.
|
||||
home:
|
||||
required: false
|
||||
description:
|
||||
- Optionally set the user's home directory.
|
||||
password:
|
||||
required: false
|
||||
description:
|
||||
- Optionally set the user's password to this crypted value. See
|
||||
the user example in the github examples directory for what this looks
|
||||
like in a playbook.
|
||||
state:
|
||||
required: false
|
||||
default: "present"
|
||||
choices: [ present, absent ]
|
||||
description:
|
||||
- Whether the account should exist. When I(absent), removes
|
||||
the user account.
|
||||
createhome:
|
||||
required: false
|
||||
default: "yes"
|
||||
choices: [ yes, no ]
|
||||
description:
|
||||
- Unless set to I(no), a home directory will be made for the user
|
||||
when the account is created.
|
||||
system:
|
||||
required: false
|
||||
default: "no"
|
||||
choices: [ yes, no ]
|
||||
description:
|
||||
- When creating an account, setting this to I(yes) makes the user a
|
||||
system account. This setting cannot be changed on existing users.
|
||||
force:
|
||||
required: false
|
||||
default: "no"
|
||||
choices: [ yes, no ]
|
||||
description:
|
||||
- When used with I(state=absent), behavior is as with
|
||||
I(userdel --force).
|
||||
remove:
|
||||
required: false
|
||||
default: "no"
|
||||
choices: [ yes, no ]
|
||||
description:
|
||||
- When used with I(state=absent), behavior is as with
|
||||
I(userdel --remove).
|
||||
|
||||
'''
|
||||
|
||||
import os
|
||||
import pwd
|
||||
import grp
|
||||
|
||||
Reference in New Issue
Block a user