user
!user
Category: access
Manage a Linux user account via useradd/usermod/userdel. Linux-only.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
user | string | yes | Username to manage. |
uid | int | no | Desired numeric UID. |
system | bool | no | Create a system user (useradd -r), only when no uid given. |
gid | string | no | Primary group name or GID. |
groups | list | no | Supplementary group names; compared against id -Gn. |
append | bool | no | When modifying groups, add to existing rather than replacing. |
create_home | bool | no | Create the home directory (-m vs -M). Default true. |
create_user_group | bool | no | Create a group with the same name as the user (-U vs -N). Default true. |
gecos | string | no | GECOS/comment field (-c). |
shell | string | no | Login shell (-s). |
remove | bool | no | Remove the user instead of creating. |
cleanup | bool | no | When removing, also delete the home directory (userdel -r). |
Examples
- !user
user: deploy
uid: 2000
groups:
- www-data
- docker
append: true
shell: /bin/bash