infrastructure/ansible/tasks/regenerate-known-hosts.yaml

10 lines
253 B
YAML
Raw Normal View History

---
- name: Generate known_hosts file
hosts: localhost
gather_facts: true
tasks:
- name: Run Keyscan
2023-09-14 11:30:13 +02:00
shell: "ssh-keyscan {{ groups['all'] | map('extract', hostvars, 'inventory_hostname') | list | join(' ') }} | sort >| ../known_hosts"