2024-02-14 03:16:24 +01:00
|
|
|
---
|
|
|
|
- name: Set SSH Public Keys for Users
|
|
|
|
become: true
|
|
|
|
ansible.posix.authorized_key:
|
2024-02-18 15:44:57 +01:00
|
|
|
user: "{{ user.name }}"
|
2024-02-14 03:16:24 +01:00
|
|
|
state: 'present'
|
2024-02-18 15:44:57 +01:00
|
|
|
key: "{{ user.pubkeys | default() }}"
|
2024-05-30 22:50:24 +02:00
|
|
|
exclusive: "{{ user.exclusive_pubkeys | default(user.exklusive_pubkeys | default(true)) }}"
|
2024-02-14 21:25:00 +01:00
|
|
|
loop: "{{ _l3d_users__merged_users }}"
|
2024-02-14 03:16:24 +01:00
|
|
|
loop_control:
|
2024-02-18 15:44:57 +01:00
|
|
|
label: "user={{ user.name }}"
|
|
|
|
loop_var: user
|
2024-06-06 17:07:55 +02:00
|
|
|
when: user.state | default ('present') == 'present'
|