From 38871d85fee5a5f3c75397eae5b2b949201c22ab Mon Sep 17 00:00:00 2001 From: djpbessems Date: Wed, 20 Apr 2022 09:46:01 +0200 Subject: [PATCH] Inject hostname to ssh-keyscan output --- playbook.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbook.yml b/playbook.yml index 97b0089..602cdb2 100644 --- a/playbook.yml +++ b/playbook.yml @@ -74,8 +74,8 @@ - name: Store public keys ansible.builtin.known_hosts: - name: "{{ item.item.name }}" - key: "{{ item.stdout }}" + name: "{{ item.item.name | lower }}" + key: "{{ item.item.name | lower }},{{ item.stdout }}" state: present path: ~/.ssh/known_hosts with_items: "{{ publickeys.results }}"