xoxys.users/tasks/users_keys.yml

12 lines
287 B
YAML
Raw Normal View History

2019-11-03 18:19:53 +01:00
---
2024-02-18 13:27:45 +01:00
- name: Set authorized_key for ssh users
ansible.posix.authorized_key:
user: "{{ item.name }}"
key: "{{ item.sshkeys }}"
exclusive: True
state: present
loop: "{{ users_default_users }}"
loop_control:
label: "{{ item.name }}"
when: item.sshkeys is defined