ansible/roles/create_users/tasks/main.yml

18 lines
357 B
YAML
Raw Normal View History

2021-01-29 22:27:04 +01:00
---
2021-01-29 23:49:19 +01:00
- name: Generate user
user:
name: "{{ item.name }}"
groups: "{{ item.groups }}"
2021-01-29 23:51:13 +01:00
shell: "{{ item.shell }}"
password: "{{ item.password_hash }}"
2021-01-29 23:49:19 +01:00
loop: "{{ uservault_users }}"
2021-04-15 16:35:51 +02:00
no_log: true
2021-01-29 23:49:19 +01:00
2021-01-30 16:31:29 +01:00
- name: Add ssh key
authorized_key:
key: "{{ item.ssh_key }}"
user: "{{ item.name }}"
2021-01-29 23:49:19 +01:00
loop: "{{ uservault_users }}"
2021-04-15 17:12:27 +02:00
no_log: true