ansible/roles/ubuntu_base/tasks/users.yml

19 lines
491 B
YAML
Raw Normal View History

2018-05-08 19:09:24 +00:00
---
- 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