From 5e837663700dd81153d4c0721a20ba067da8b239 Mon Sep 17 00:00:00 2001 From: djpbessems Date: Tue, 19 Apr 2022 21:37:10 +0200 Subject: [PATCH] Populate 'known_hosts' --- playbook.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/playbook.yml b/playbook.yml index 0344129..2342220 100644 --- a/playbook.yml +++ b/playbook.yml @@ -66,6 +66,11 @@ groups: k3s_ha with_items: "{{ nodes }}" + - name: Store public keys in 'known_hosts' + ansible.builtin.command: + cmd: ssh-keyscan -t rsa {{ item.ip }} >> ~/.ssh/known_hosts + with_items: "{{ nodes }}" + - name: Provision Kubernetes hosts: k3s_ha gather_facts: false