1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_collection_users.git synced 2024-08-16 10:29:50 +02:00
ansible_collection_users/roles/user/tasks/pubkeys.yml

14 lines
406 B
YAML
Raw Normal View History

---
- name: Set SSH Public Keys for Users
become: true
ansible.posix.authorized_key:
2024-02-18 15:44:57 +01:00
user: "{{ user.name }}"
state: 'present'
2024-02-18 15:44:57 +01:00
key: "{{ user.pubkeys | default() }}"
2024-04-09 18:27:39 +02:00
exclusive: "{{ user.exklusive_pubkeys | default(true) }}"
2024-02-14 21:25:00 +01:00
loop: "{{ _l3d_users__merged_users }}"
loop_control:
2024-02-18 15:44:57 +01:00
label: "user={{ user.name }}"
loop_var: user
2024-03-22 16:40:22 +01:00
when: user.state | default ('present') == 'present'