https://github.com/pwannenmacher/role_users
Ansible role for creating, updating and deleting users on Debian based systems
https://github.com/pwannenmacher/role_users
ansible ansible-role debian
Last synced: 2 months ago
JSON representation
Ansible role for creating, updating and deleting users on Debian based systems
- Host: GitHub
- URL: https://github.com/pwannenmacher/role_users
- Owner: pwannenmacher
- License: mit
- Created: 2025-05-01T10:00:55.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-11-21T14:21:24.000Z (7 months ago)
- Last Synced: 2025-11-21T16:14:40.744Z (7 months ago)
- Topics: ansible, ansible-role, debian
- Language: Ruby
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deploy-Users
Creates all users defined by vars. Removes all undefined users except the user running ansible.
## Requirements
none
## Role Variables
| Variable | Required | Default | Choices | Comments |
|------------------------|----------|---------|---------|------------------------------------------------------------------------------------------|
| user_groups | yes | [] | | List of user groups that shall exist (may be used globally or at host group level) |
| additional_user_groups | yes | [] | | List of additional user groups that shall exist (may be used for each host individually) |
| users | yes | {} | | List of user objects (see description below) |
| additional_users | yes | {} | | List of additional user objects (see description below) |
| passwordless_sudo | yes | false | | Allow passwordless sudo access for all sudo allowed users |
Users have to be defined like this:
```yaml
users:
- name: username
comment: Some User
groups:
- users
- admin
password_hash: "$6$RQJceekL9DN9Z2HL$cKcX5.Ja21cVK/wCDoX21X7Im8KNPo43WLUbJFBNcSuJRUvDwIzj2HaT/oQqNiV8YEjsRaxKLTUHz1zIthe6D1"
password: "P@$$w0rd"
password_salt: "S@LT"
sudo: true
passwordless_sudo: true
ssh_authorized_keys:
- ssh-rsa [...]
```
If `password_hash` is defined, the values in `password` and `password_salt` are ignored.
## Dependencies
Only default modules are used. No dependencies.
## Example Playbook
```yaml
- hosts: all
become: true
roles:
- role: role_users
```
## License
MIT
## Author Information
Paul Wannenmacher