Add default user

stable
Dryusdan 1 year ago
parent b37e2c2e62
commit 82e09c3848

@ -18,6 +18,18 @@
tags:
- create_default
- name: Add authorized_keys for default users
ansible.builtin.template:
src: authorized_keys.j2
dest: "{{ item.home }}/.ssh/authorized_keys"
owner: "{{ item.name }}"
group: "{{ item.name }}"
mode: '0640'
loop: "{{ default_users }}"
when: item.authorized_keys is defined and (item.state is not defined or item.state != "absent")
tags:
- create
- name: Create users
user:
name: "{{ item.name }}"

Loading…
Cancel
Save