Docs: Add playbook to regenerate known_hosts file

This commit is contained in:
Tobias Manske 2023-09-13 06:32:24 +02:00
parent a2a5b29cd6
commit 8d9b47076b
Signed by: tobias
GPG Key ID: 9164B527694A0709
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
---
- name: Generate known_hosts file
hosts: localhost
gather_facts: true
tasks:
- name: Run Keyscan
shell: "ssh-keyscan {{ groups['all'] | map('extract', hostvars, 'inventory_hostname') | list | join(' ') }} >| known_hosts"