ansible-common/tasks/auth.yml
Frank Villaro-Dixon aa0bea9b70 ssh keys: append instead of overwrite
Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu>
2024-10-22 15:34:08 +02:00

14 lines
301 B
YAML

- name: Set up authorized_keys file for root
file:
path: /root/.ssh
state: directory
mode: '0700'
owner: root
group: root
- name: Add SSH authorized keys
ansible.posix.authorized_key:
user: root
key: "{{ item }}"
state: present
with_items: "{{ vars.ssh_keys }}"