diff --git a/playbook.yml b/playbook.yml index a79d282..05caa94 100644 --- a/playbook.yml +++ b/playbook.yml @@ -68,7 +68,7 @@ - name: Scan public keys ansible.builtin.command: - cmd: "ssh-keyscan -t rsa {{ item.ip }}" + cmd: "ssh-keyscan -t rsa {{ item.ip }} | grep ^[^#]" register: publickeys with_items: "{{ nodes }}"