Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/hrafnthor/ansible-identities
- Owner: hrafnthor
- License: apache-2.0
- Created: 2024-11-19T21:19:34.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-24T19:07:43.000Z (about 1 month ago)
- Last Synced: 2024-12-13T02:09:27.002Z (25 days ago)
- Topics: ansible, linux, user-management
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```