Skip to content

User

The builtin.user resource allow to manage everything related to a user, from the shell that it should have, to the creation and deletion of the user, and groups membership.

Resource parameters

NameDescriptionRequiredDefault
usernameUsername of the user to manage.true
groupsList of groups the user should be a member of. None of those group will actually get created, you have to create them yourself.false
manage_homeWhether or not to manage the home directory of the userfalsetrue
shellThe shell that the user should be assignedfalse/bin/bash

Examples

Create a user named jeff

yaml
- title: "Create user jeff"
  type: "builtin.user"
  present: true
  data:
    username: "jeff"

Delete a user named jeff

yaml
- title: "Delete user jeff"
  type: "builtin.user"
  present: false
  data:
    username: "jeff"