forked from data.coop/ansible
19 lines
491 B
YAML
19 lines
491 B
YAML
---
|
|
- name: "Add users (set password to 'changeme')"
|
|
user:
|
|
name: "{{ item.key }}"
|
|
comment: "{{ item.value.comment }}"
|
|
password: "$1$gbSjoDr0$NgvOjcEBSzdK.WqjWGEfw0"
|
|
update_password: "on_create"
|
|
groups:
|
|
- {{ item.groups }}
|
|
with_dict: "{{ users | default({}) }}"
|
|
tags: usermanagement
|
|
|
|
- name: "Add ssh authorized_keys"
|
|
authorized_key:
|
|
user: "{{ item.key }}"
|
|
key: "{{ item.value.key }}"
|
|
with_dict: "{{ users | default({}) }}"
|
|
tags: usermanagement
|