Created
August 9, 2018 02:37
-
-
Save chuckersjp/ebff8e6edc59029ac0cfced709148a25 to your computer and use it in GitHub Desktop.
gist to scan all inventory nodes and dump them to known_hosts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# copied from https://gist.github.com/shirou/6928012 | |
- hosts: all | |
gather_facts: no | |
sudo: no | |
tasks: | |
- name: run ssh-keyscan to add keys to known_hosts | |
local_action: shell ssh-keyscan {{ ansible_ssh_host }} >> ~/.ssh/known_hosts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment