arillso.system.users role – Cross-platform user management

Note

This role is part of the arillso.system collection (version 0.0.34).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it use: ansible-galaxy collection install arillso.system.

To use it in a playbook, specify: arillso.system.users.

Entry point create_user_linux – Linux user management

Synopsis

  • This role manages Linux users, their home directories, SSH keys,

  • and file permissions based on OS-specific variables.

Parameters

Parameter

Comments

users_list

list / elements=dictionary / required

A list of users with their properties to be ensured on the system.

authorized_keys

list / elements=string

SSH keys to add to the user’s authorized_keys file. Optional.

group

string

Primary group for the user. Optional, system default is used if not specified.

groups

list / elements=string

List of additional groups the user will be added to. Optional.

home

path

Home directory to create or manage. Optional if system default is used.

name

string

Full name of the user. Optional, but recommended for clarity.

password

string

Password for the user, can be optionally hashed. Optional, but recommended for security.

shell

string

The shell assigned to the user. Optional, defaults to system standard.

ssh_key_generate

boolean

Indicates whether to generate SSH keys for the user. Default is false.

Choices:

  • false

  • true

system

boolean

Specifies if the user is a system account. Default is false.

Choices:

  • false

  • true

uid

integer

The numeric user id for the user. Optional for system-generated IDs.

update_password

string

Determines whether to update the password if it differs from the current one. Optional.

username

string / required

The username of the account.

Entry point create_user_windows – Windows user management

Synopsis

  • This section manages Windows user accounts, setting properties,

  • managing group memberships, and editing registry settings for user configurations.

Parameters

Parameter

Comments

users_list

list / elements=dictionary / required

A list of users with their properties to be ensured on the system.

authorized_keys

list / elements=string

SSH keys to add to the user’s authorized_keys file. Optional.

group

string

Primary group for the user. Optional, system default is used if not specified.

groups

list / elements=string

List of additional groups the user will be added to. Optional.

home

path

Home directory to create or manage. Optional if system default is used.

name

string

Full name of the user. Optional, but recommended for clarity.

password

string

Password for the user, can be optionally hashed. Optional, but recommended for security.

shell

string

The shell assigned to the user. Optional, defaults to system standard.

ssh_key_generate

boolean

Indicates whether to generate SSH keys for the user. Default is false.

Choices:

  • false

  • true

system

boolean

Specifies if the user is a system account. Default is false.

Choices:

  • false

  • true

uid

integer

The numeric user id for the user. Optional for system-generated IDs.

update_password

string

Determines whether to update the password if it differs from the current one. Optional.

username

string / required

The username of the account.

Entry point main – Cross-platform user management

Synopsis

  • This role manages user accounts on both Linux and Windows systems.

  • It applies OS-specific configurations and handles user attributes,

  • such as home directories, SSH keys, and permissions.

Parameters

Parameter

Comments

users_authorized_keys_exclusive

string

Whether to exclusively manage the ‘authorized_keys’ file. Default is ‘no’.

Default: "no"

users_group

string

Default primary group for users. Not set by default.

users_group_list

list / elements=dictionary / required

A list of users with their properties to be ensured on the system.

authorized_keys

list / elements=string

SSH keys to add to the user’s authorized_keys file. Optional.

group

string

Primary group for the user. Optional, system default is used if not specified.

groups

list / elements=string

List of additional groups the user will be added to. Optional.

home

path

Home directory to create or manage. Optional if system default is used.

name

string

Full name of the user. Optional, but recommended for clarity.

password

string

Password for the user, can be optionally hashed. Optional, but recommended for security.

shell

string

The shell assigned to the user. Optional, defaults to system standard.

ssh_key_generate

boolean

Indicates whether to generate SSH keys for the user. Default is false.

Choices:

  • false

  • true

system

boolean

Specifies if the user is a system account. Default is false.

Choices:

  • false

  • true

uid

integer

The numeric user id for the user. Optional for system-generated IDs.

update_password

string

Determines whether to update the password if it differs from the current one. Optional.

username

string / required

The username of the account.

users_groups

list / elements=string

List of default secondary groups for users. Defaults to an empty list.

Default: []

users_home

path

Default home directory path for users. Default is ‘/home’.

Default: "/home"

users_home_mode

string

Default permissions for users’ home directories. Default is ‘0755’.

Default: "0755"

users_host_list

list / elements=dictionary / required

A list of users with their properties to be ensured on the system.

authorized_keys

list / elements=string

SSH keys to add to the user’s authorized_keys file. Optional.

group

string

Primary group for the user. Optional, system default is used if not specified.

groups

list / elements=string

List of additional groups the user will be added to. Optional.

home

path

Home directory to create or manage. Optional if system default is used.

name

string

Full name of the user. Optional, but recommended for clarity.

password

string

Password for the user, can be optionally hashed. Optional, but recommended for security.

shell

string

The shell assigned to the user. Optional, defaults to system standard.

ssh_key_generate

boolean

Indicates whether to generate SSH keys for the user. Default is false.

Choices:

  • false

  • true

system

boolean

Specifies if the user is a system account. Default is false.

Choices:

  • false

  • true

uid

integer

The numeric user id for the user. Optional for system-generated IDs.

update_password

string

Determines whether to update the password if it differs from the current one. Optional.

username

string / required

The username of the account.

users_list

list / elements=dictionary / required

A list of users with their properties to be ensured on the system.

authorized_keys

list / elements=string

SSH keys to add to the user’s authorized_keys file. Optional.

group

string

Primary group for the user. Optional, system default is used if not specified.

groups

list / elements=string

List of additional groups the user will be added to. Optional.

home

path

Home directory to create or manage. Optional if system default is used.

name

string

Full name of the user. Optional, but recommended for clarity.

password

string

Password for the user, can be optionally hashed. Optional, but recommended for security.

shell

string

The shell assigned to the user. Optional, defaults to system standard.

ssh_key_generate

boolean

Indicates whether to generate SSH keys for the user. Default is false.

Choices:

  • false

  • true

system

boolean

Specifies if the user is a system account. Default is false.

Choices:

  • false

  • true

uid

integer

The numeric user id for the user. Optional for system-generated IDs.

update_password

string

Determines whether to update the password if it differs from the current one. Optional.

username

string / required

The username of the account.

users_ssh_key_bits

integer

Default SSH key bit length for users. Default is 2048.

Default: 2048

users_ssh_key_type

string

Default SSH key type for users. Default is ‘rsa’.

Default: "rsa"