Add root keys for all users

And not just the last user.
This commit is contained in:
Reynir Björnsson 2022-11-16 16:10:10 +01:00
parent a03263b1f5
commit c802777867

View file

@ -18,6 +18,5 @@
- name: "Add ssh authorized_keys to root user"
authorized_key:
user: "root"
key: "{{ item.ssh_keys | join('\n') }}"
key: "{{ users | default([]) | map(attribute='ssh_keys') | join('\n') }}"
exclusive: true
loop: "{{ users | default([]) }}"