10 lines
250 B
YAML
10 lines
250 B
YAML
---
|
|
- 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(' ') }} | sort >| known_hosts"
|
|
|
|
|