xoxys.users/tasks/users_keys.yml
Robert Kaussow 992c239b08
All checks were successful
continuous-integration/drone/push Build is passing
feat: set exclusive option for ssh keys
2022-09-12 16:25:17 +02:00

15 lines
357 B
YAML

---
- block:
- name: Set authorized_key for ssh users
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
become: True
become_user: root