2024-10-12 23:08:56 +00:00
|
|
|
- name: Set up authorized_keys file for root
|
|
|
|
file:
|
|
|
|
path: /root/.ssh
|
|
|
|
state: directory
|
|
|
|
mode: '0700'
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
|
2024-10-22 13:34:08 +00:00
|
|
|
- name: Add SSH authorized keys
|
|
|
|
ansible.posix.authorized_key:
|
|
|
|
user: root
|
|
|
|
key: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
with_items: "{{ vars.ssh_keys }}"
|