Skip to content

grlx.ingredients.user

The user ingredient handles user operations on sprouts.

user.absent

Removes a user if it exists

Parameters

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

user.exists

Validates if a user exists

Parameters

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

user.present

Creates a new user if it does not exist

Parameters

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