https://github.com/coopdevs/sys-admins-role
Ansible role to create users for system administrators
https://github.com/coopdevs/sys-admins-role
Last synced: 10 months ago
JSON representation
Ansible role to create users for system administrators
- Host: GitHub
- URL: https://github.com/coopdevs/sys-admins-role
- Owner: coopdevs
- License: gpl-3.0
- Created: 2018-04-20T10:35:20.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-09-07T12:00:36.000Z (almost 3 years ago)
- Last Synced: 2025-02-22T11:18:12.817Z (over 1 year ago)
- Language: Jinja
- Homepage:
- Size: 25.4 KB
- Stars: 5
- Watchers: 13
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Sys Admins Role
=========
This role help you to mantain the system administration users.
With this role you can:
* Create a group for the system administrators to manage the permissions easy
* Create system administrator users
* Remove system administrator users
* Add `sudo` permissions to system administrator users
This role need be runned with `sudo` access.
Role Variables
--------------
> **This variables must be declared to run this role.**
The role variables are:
### `sys_admins`
A list of users. Any item need be in the next structure:
```yaml
sys_admins:
- name: user1
ssh_key: "~/.ssh/id_rsa.pub"
state: present
- name: user2
ssh_key: "~/.ssh/id_rsa.pub"
state: absent
```
System Administrators vars:
- `name`: User name
- `ssh_key`: Path of ssh key to be copied in user ssh authorized keys file.
- `state`: Choices absent or present
### `sys_admin_group`
The name of the system adnimistrators group
```yaml
sys_admin_group: sysadmin-group
```
Example Playbook
----------------
```yaml
- hosts: servers
roles:
- role: coopdevs.sys_admins
sys_admin_group: sysadmin-group
sys_admins:
- name: sysadmin
ssh_key: "~/.ssh/id_rsa.pub"
state: present
```
License
-------
GPLv3
Author Information
------------------
Coopdevs http://coopdevs.org