Skip to content

grlx.ingredients.user

The user ingredient handles user operations on sprouts.

Removes a user if it exists

parameter type required description
name string yes the name of the user to be removed
user.absent:
- name: supersprout

Validates if a user exists

parameter type required description
name string yes The username to check
user.exists:
- name: sproutuser

Creates a new user if it does not exist

parameter type required description
name string yes The username of the user
uid string no The UID assigned to the user
gid string no The GID to the user
groups list, string no A list groups the user is part of
shell string no The user login shell, /bin/false by default
home string no The 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