Manage the system users
This module ensures a particular user is present on, or absent from, the remote machine.
It ensures that the configuration of the user matches the values specified.
The user can be specified by username or by user id. If both are specified the user is found by name, and the id is set to match the id value.
Note: User creation and deletion honours the USERGROUPS_ENAB setting in /etc/login.defs on systems that use this.
(user command options)
command
The state the user should be in. Should be one of :present
or :absent
.
:present
Ensures the named user is present and has the specified settings
:absent
Ensures the named user is absent
options
A hashmap of options. All available option keys and their values are described below
Option | Description |
---|---|
:name type string | The username |
:uid type string | The user's id number |
:home type string | The user's home directory path |
:create-home type boolean | If the user's home directory does not exist, create it. |
:move-home type boolean | Move the user's home directory to the new location. Only effective when modifying an existing user. |
:group type string | The user's primary group. |
:groups type vector | A list of groups the user should belong to |
:password type string | An encrypted password string to use for the user's password login. |
:shell type string | The path to the users default shell. |
:comment type string | The comment field to add against the user in the users database. |