Skip to content

grlx.ingredients.user

The user ingredient handles user operations on sprouts.

Removes a user if it exists

parametertyperequireddescription
namestringyesthe name of the user to be removed
user.absent:
- name: supersprout

Validates if a user exists

parametertyperequireddescription
namestringyesThe username to check
user.exists:
- name: sproutuser

Creates a new user if it does not exist

parametertyperequireddescription
namestringyesThe username of the user
uidstringnoThe UID assigned to the user
gidstringnoThe GID to the user
groupslist, stringnoA list groups the user is part of
shellstringnoThe user login shell, /bin/false by default
homestringnoThe path to the user’s home directory if one is required
user.present:
- name: sproutuser
- uid: "1003"
- gid: "1003"
- groups:
- wheel
- media
- sudo
- shell: /bin/bash
- home: /var/sproutuser