homelab-ansible/playbooks/distribute_ssh_key.yml
2025-03-20 19:59:48 -04:00

11 lines
278 B
YAML

---
- name: Distribute SSH public key to my hosts
hosts: all
become: true
tasks:
- name: Add SSH key for remote user
ansible.posix.authorized_key:
user: javi
state: present
key: "{{ lookup('file', '/home/javi/.ssh/homelab_keypair_ed25519.pub') }}"