Ansible Role: users
An Ansible role that manages users and groups on Debian/Ubuntu and RHEL/CentOS.
ansible-galaxy install linconf.users
Add a User
- hosts: localhost roles: - linconf.users vars: users_accounts: - name: 'NewUser' group: 'NewUser' # Additional Groups groups: ['wheel', 'users'] password: '$6$c6pQJ3kzW80oZwTi$...' update_password: 'always'
See the Ansible user module for a full list of available options.
Password hash created using:
Remove a User
users_accounts: - name: 'NewUser' state: absent
Add a Group
users_groups: - name: 'NewGroup'
Whenever you add a user to a group that doesn't yet exist on the system (using
groups: option of
users_accounts) you must also use
add the group to the system.
See the linconf.users documentation for a full list of available options.
Optionally, this role has 3 lists for users, and 3 lists for groups. This can be useful in situations where groups of hosts share the same users.
Dependencies / Requirements
The master branch is continuously validated by Travis-CI.
Minor versions indicate the role passed local testing as described by the
.kitchen declaration. Instructions for performing test-kitchen runs locally
are detailed in the LinConf Documentation.
Author and License
Released under the MIT License