| **append** | boolean | false | If`true`, add the user to the groups specified in`groups`. <br>If`false`, user will only be added to the groups specified in`groups`, removing them from all other groups. |
| **create_home** | boolean | true | Unless set to`false`, a home directory will be made for the user when the account is created or if the home directory does not exist. |
| **expires** | float | - | An expiry time for the user in epoch, it will be ignored on platforms that do not support this. Currently supported on GNU/[Linux](../../../linux/Linux.md), [FreeBSD](../../../bsd/FreeBSD.md), and DragonFlyBSD. Since Ansible 2.6 you can remove the expiry time by specifying a negative value. Currently supported on GNU/[Linux](../../../linux/Linux.md) and [FreeBSD](../../../bsd/FreeBSD.md) |
| **force** | boolean | false | This only affects`state=absent`, it forces removal of the user and associated directories on supported platforms. The behavior is the same as`userdel--force`, check the man page for`userdel`on your system for details and support. When used with`generate_ssh_key=yes`this forces an existing key to be overwritten. |
| **generate_ssh_key** | boolean | false | Whether to generate a [SSH](../../../applications/network/SSH.md) key for the user in question. This will**not**overwrite an existing [SSH](../../../applications/network/SSH.md) key unless used with`force=yes`. |
| **group** | string | - | Optionally sets the user’s primary group (takes a group name). |
| **groups** | list / elements=string | - | List of groups user will be added to. By default, the user is removed from all other groups. Configure`append`to modify this. When set to an empty string`''`, the user is removed from all groups except the primary group. |
| **home** | path | - | Optionally set the user’s home directory. |
| **move_home** | boolean | false | If set to`true`when used with`home:`, attempt to move the user’s old home directory to the specified directory if it isn’t there already and the old home exists. |
| **name** | string / required | - | Name of the user to create, remove or modify. |
| **password** | string | - | If provided, set the user’s password to the provided encrypted hash ([Linux](../../../linux/Linux.md)) or plain text password ([macOS](../../../macos/macOS.md)). You can generate the encrypted hash with the `mkpasswd` command. |
| **remove** | boolean | false | This only affects`state=absent`, it attempts to remove directories associated with the user. The behavior is the same as`userdel--remove`, check the man page for details and support. |
| **shell** | string | - | Optionally set the user’s [shell](../../../applications/cli/Shell.md). |
| **ssh_key_bits** | integer | - | Optionally specify number of bits in [SSH](../../../applications/network/SSH.md) key to create. The default value depends on ssh-keygen. |
| **ssh_key_comment** | string | "ansible-generatedon$HOSTNAME" | Optionally define the comment for the [SSH](../../../applications/network/SSH.md) key. |
| **ssh_key_file** | path | .ssh/id_rsa | Optionally specify the [SSH](../../../applications/network/SSH.md) key filename. If this is a relative filename then it will be relative to the user’s home directory. |
| **ssh_key_passphrase** | string | - | Set a passphrase for the [SSH](../../../applications/network/SSH.md) key. If no passphrase is provided, the [SSH](../../../applications/network/SSH.md) key will default to having no passphrase. |
| **ssh_key_type** | string | "rsa" | Optionally specify the type of [SSH](../../../applications/network/SSH.md) key to generate. |
| **state** | "present"<br>"absent" | present | Whether the account should exist or not, taking action if the state is different from what is stated. |
| **system** | boolean | false | When creating an account`state=present`, setting this to`true`makes the user a system account. |
| **uid** | integer | - | Optionally sets the UID of the user. |
| **update_password** | "always"<br>"on_create" | "always" | `always`will update passwords if they differ. <br>`on_create`will only set the password for newly created users. |