ansible/roles/create_users/tasks/main.yml
2021-04-15 17:12:27 +02:00

17 lines
357 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 }}"
no_log: true