https://github.com/simplificator/ansible-role-linux-accounts
An Ansible role to provision multiple Linux accounts including SSH keys.
https://github.com/simplificator/ansible-role-linux-accounts
Last synced: 5 months ago
JSON representation
An Ansible role to provision multiple Linux accounts including SSH keys.
- Host: GitHub
- URL: https://github.com/simplificator/ansible-role-linux-accounts
- Owner: simplificator
- License: mit
- Created: 2023-03-06T13:01:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-12-30T16:04:44.000Z (7 months ago)
- Last Synced: 2026-01-03T10:38:43.983Z (7 months ago)
- Language: Jinja
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Ansible Role: Linux Accounts
[](https://github.com/simplificator/ansible-role-linux-accounts/actions?query=workflow%3ACI)
An Ansible role to provision multiple Linux accounts including SSH keys.
## Requirements
N/A
## Role Variables
You need to define the following variable:
* `linux_accounts_default_users`: A dictionary of user account names and a list of their SSH keys.
* `linux_accounts_group`: Name of the group which will be created and users will be added. Note that any users in this group that aren't mentioned in `linux_accounts_default_users` nor `linux_accounts_additional_users` will be deleted.
* `linux_accounts_default_sudo_users`: List of user names that will be added to the sudo group.
If you have a set of default users per system, but want to add additional ones depending on the system, you can define `linux_accounts_additional_users` with the same structure as `linux_accounts_default_users`. Same applies to `linux_accounts_additional_sudo_users` with `linux_accounts_default_sudo_users`.
## Dependencies
None.
## Example Playbook
```yaml
- hosts: myserver
roles:
- { role: simplificator.linux_accounts }
vars:
linux_accounts_default_users: {
"alice": "alicessshkey"
}
linux_accounts_default_sudo_users:
- "alice"
```
## License
MIT / BSD