datacoop.ansible/roles/ubuntu_base/tasks/users.yml

16 lines
407 B
YAML

---
- name: "Add users"
user:
name: "{{ item.key }}"
comment: "{{ item.value.comment }}"
password: "{{ item.value.password }}"
update_password: "on_create"
groups: "{{ item.value.groups }}"
with_dict: "{{ users | default({}) }}"
- name: "Add ssh authorized_keys"
authorized_key:
user: "{{ item.key }}"
key: "{{ item.value.key }}"
with_dict: "{{ users | default({}) }}"