866f02bdbb
Signed-off-by: Nis Wechselberg <enbewe@enbewe.de>
14 lines
358 B
YAML
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 }}'
|