Infrastructure/ansible/roles/common/tasks/root_sshkeys.yml

9 lines
291 B
YAML

---
- name: Add public keys for root
ansible.posix.authorized_key:
user: root
key: "{{ lookup('file', '../../access/keys/' + item + '.pub') }}"
state: present # Note: we don't remove other/existing keys
with_items: "{{ global_ssh_keys + (ssh_keys['root'] | default([])) }}"