Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hrafnthor/ansible-identities

An Ansible role for managing users and groups
https://github.com/hrafnthor/ansible-identities

ansible linux user-management

Last synced: 25 days ago
JSON representation

An Ansible role for managing users and groups

Awesome Lists containing this project

README

        

## Ansible Users

An Ansible role for creating users, groups and doing various modifications related to them.

### Values

All values are optional unless otherwise marked as required:

```yaml
identities:
root:
login: bool
groups:
- id: integer
name: String
state: [ absent, present ]
users:
- id: integer
name: String
comment: String
password:
value: String
policy: [
always
on_create
]
group:
id: integer
name: String
groups: String array
shell: String
home:
state: [
absent,
present
],
mode: String
state: [
absent,
present
]
sudoer:
state: [
absent,
present
]
privileges: String
file: String
ssh:
authorized:
- key: String
state: [
absent,
present
]
```

#### Example:

```yaml
identities:
root:
login: false
groups:
- id: 1234
name: æsir
state: absent
- name: vanir
users:
- id: 7777
name: Freyja
comment: "Godess of home and hearth"
password:
value: "$6$pnrja6mdaIDRT8jY$ZXUTacmWsztweowb3NIjS95EhIlfLv4OwncWtHK0AubenlLExhKTeuf/B/FQK4PX0mIzHdhwSoJNssbrndacU/"
policy: always
groups:
- vanir
- gods
- sudo
shell: "/bin/fish"
home:
mode: "0777" # Only Freyja should do this!
sudoer:
privileges: "ALL=(ALL) NOPASSWD: ALL"
ssh:
authorized:
- key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPJLon4ATM0Bb6CbQPkOs1UnobDtUATfzCZ+MWcO8Q54 freyja
- key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPQwZJNnlC8YzLEpEGDTizfH18kJ2UHXZkFrfOpDXsxP odinn
state: absen
```