ansible-collection-base/playbooks/known_hosts.yml
Nis Wechselberg 866f02bdbb
Initial base playbooks
Signed-off-by: Nis Wechselberg <enbewe@enbewe.de>
2024-06-17 16:45:02 +02:00

14 lines
358 B
YAML

---
- name: 'Install SSH keys as known hosts'
hosts: 'all'
serial: 1
gather_facts: false
tasks:
- name: 'Register host key'
delegate_to: 'localhost'
throttle: 1
when: 'ssh_ed25519'
ansible.builtin.known_hosts:
name: '{{ inventory_hostname }}'
key: '{{ inventory_hostname }} ssh-ed25519 {{ ssh_ed25519 }}'