You've already forked role_users
feat: Create role
This commit is contained in:
44
README.md
44
README.md
@@ -1,3 +1,43 @@
|
||||
# role_modele
|
||||
# role_users
|
||||
|
||||
Modèle
|
||||
Deploy users, groups, sudoers and ssh authorized_keys.
|
||||
|
||||
## 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 <key> ansible
|
||||
- ssh-ed25519 <key> bot_ansible
|
||||
sudoers: ansible ALL=(ALL) NOPASSWD:ALL
|
||||
- name: flast
|
||||
comment: First LAST
|
||||
password: <https://docs.ansible.com/ansible/latest/collections/ansible/builtin/user_module.html#parameter-password>
|
||||
password_lock: false
|
||||
shell: /bin/bash
|
||||
groups: ["sudo", "adm"]
|
||||
extras:
|
||||
authorized_keys:
|
||||
- ssh-ed25519 <key> flast@computer1
|
||||
- ssh-ed25519 <key> flast@computer2
|
||||
```
|
||||
|
Reference in New Issue
Block a user