ansible/roles/create_users/tasks/main.yml
2021-04-15 16:35:51 +02:00

16 lines
342 B
YAML

---
- name: Generate user
user:
name: "{{ item.name }}"
groups: "{{ item.groups }}"
shell: "{{ item.shell }}"
password: "{{ item.password_hash }}"
loop: "{{ uservault_users }}"
no_log: true
- name: Add ssh key
authorized_key:
key: "{{ item.ssh_key }}"
user: "{{ item.name }}"
loop: "{{ uservault_users }}"