Files
ansible-collection/roles/authorized-key-root/tasks/main.yml
T
2026-10-18 12:34:19 +04:00

16 lines
287 B
YAML

---
- name: ensure .ssh exists
ansible.builtin.file:
path: /root/.ssh
state: directory
mode: "0700"
owner: root
group: root
- name: set authorized key
ansible.posix.authorized_key:
user: root
state: present
key: "{{ item }}"
loop: "{{ ssh_keys }}"