From 8d9b47076b91672d036ee5c834ae7181fef44396 Mon Sep 17 00:00:00 2001 From: Tobias Manske Date: Wed, 13 Sep 2023 06:32:24 +0200 Subject: [PATCH] Docs: Add playbook to regenerate known_hosts file --- coreos-config/regenerate-known-hosts.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 coreos-config/regenerate-known-hosts.yaml diff --git a/coreos-config/regenerate-known-hosts.yaml b/coreos-config/regenerate-known-hosts.yaml new file mode 100644 index 0000000..6526b33 --- /dev/null +++ b/coreos-config/regenerate-known-hosts.yaml @@ -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" + +