2023-05-23 10:11:36 +00:00
|
|
|
# role_users
|
2022-10-10 09:18:54 +00:00
|
|
|
|
2023-05-23 10:11:36 +00:00
|
|
|
Ce rôle permet de créer et configurer des utilisateurs systèmes.
|
|
|
|
|
|
|
|
## Variables
|
|
|
|
|
|
|
|
### users_*
|
|
|
|
|
|
|
|
Liste contenant la configuration des utilisateurs.
|
|
|
|
|
|
|
|
*<span style="text-decoration: underline">Valeur par défaut:</span> aucune*
|
|
|
|
|
|
|
|
## Exemple d'utilisation
|
|
|
|
|
|
|
|
### inventory.yml
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
---
|
|
|
|
|
|
|
|
all:
|
|
|
|
hosts:
|
|
|
|
host1.ykn.local:
|
|
|
|
```
|
|
|
|
|
|
|
|
### host_vars/host1.ykn.local.yml
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
---
|
|
|
|
|
|
|
|
users: []
|
|
|
|
- name: ansible
|
|
|
|
comment: "Ansible user"
|
|
|
|
update_password: on_create
|
|
|
|
password_lock: true
|
|
|
|
append: true
|
|
|
|
shell: /bin/bash
|
|
|
|
groups: ["sudo"]
|
|
|
|
extras:
|
|
|
|
authorized_keys:
|
|
|
|
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILNxxMmKSUHibYrlwyhx6UzyEAIPrghuQ/2fiCvcGAfh ansible
|
|
|
|
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJPerG1LAvNuuwuMnlExCyfsRwGqrM1U3C/aUtuXqhyu bot_ansible
|
|
|
|
sudoers: ansible ALL=(ALL) NOPASSWD:AL
|
|
|
|
```
|