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

9 lines
250 B
YAML

---
- name: add ssh keys to 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: "{{ ssh_root_keys }}"