Manage the system users


  • This module ensures a particular user is present on, or absent from, the remote machine.

  • It ensures that the configuration of the user matches the values specified.

  • The user can be specified by username or by user id. If both are specified the user is found by name, and the id is set to match the id value.

  • Note: User creation and deletion honours the USERGROUPS_ENAB setting in /etc/login.defs on systems that use this.


(user command options)



The state the user should be in. Should be one of :present or :absent.


Ensures the named user is present and has the specified settings


Ensures the named user is absent


A hashmap of options. All available option keys and their values are described below


type string

    The username

type string

    The user's id number

type string

    The user's home directory path

type boolean

    If the user's home directory does not exist, create it.

type boolean

    Move the user's home directory to the new location. Only effective when modifying an existing user.

type string

    The user's primary group.

type vector

    A list of groups the user should belong to

type string

    An encrypted password string to use for the user's password login.

type string

    The path to the users default shell.

type string

    The comment field to add against the user in the users database.