Compare commits

...

3 commits

Author SHA1 Message Date
reynir a92d840ce0 Merge pull request 'Add root keys for all users' (#120) from fix-root-keys into main
Reviewed-on: #120
2022-11-16 15:24:44 +00:00
Reynir Björnsson 5a54eb6b1e Flatten the list 2022-11-16 16:24:22 +01:00
Reynir Björnsson c802777867 Add root keys for all users
And not just the last user.
2022-11-16 16:10:10 +01:00

View file

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