I\'m running Ansible playbook and it works fine on one machine.
On a new machine when I try for the first time, I get the following error.
17:04:34
Following @Stepan Vavra's correct answer. A shorter version is:
- known_hosts: name: "{{ item }}" key: "{{ lookup('pipe', 'ssh-keyscan {{ item }},`dig +short {{ item }}`') }}" with_items: - google.com - github.com