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.
:presentEnsures the named user is present and has the specified settings
:absentEnsures the named user is absent
options
A hashmap of options. All available option keys and their values are described below
| Option | Description |
|---|---|
:nametype string | The username |
:uidtype string | The user's id number |
:hometype string | The user's home directory path |
:create-hometype boolean | If the user's home directory does not exist, create it. |
:move-hometype boolean | Move the user's home directory to the new location. Only effective when modifying an existing user. |
:grouptype string | The user's primary group. |
:groupstype vector | A list of groups the user should belong to |
:passwordtype string | An encrypted password string to use for the user's password login. |
:shelltype string | The path to the users default shell. |
:commenttype string | The comment field to add against the user in the users database. |