ansible/roles/ubuntu_base/tasks/users.yml
Jesper Hess 964a6c0793 Add some more useful ansible tags
- do-full-system-upgrade
- setup-users
- install-base-packages
2022-07-22 12:37:39 +00:00

29 lines
634 B
YAML

---
- name: "Add users"
user:
name: "{{ item.name }}"
comment: "{{ item.comment }}"
password: "{{ item.password }}"
update_password: "on_create"
groups: "{{ item.groups }}"
loop: "{{ users | default([]) }}"
tags: "setup-users"
- name: "Add ssh authorized_keys"
authorized_key:
user: "{{ item.0.name }}"
key: "{{ item.1 }}"
with_subelements:
- "{{ users | default([]) }}"
- keys
tags: "setup-users"
- name: "Add ssh authorized_keys to root user"
authorized_key:
user: "root"
key: "{{ item.1 }}"
with_subelements:
- "{{ users | default([]) }}"
- keys
tags: "setup-users"