-
-
Save xayangjing/5af62c173cc634274a6f4e6c050309ea to your computer and use it in GitHub Desktop.
run ssh-keyscan to add keys to known_hosts. This is a playbook for ansible
This file contains hidden or 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
--- | |
- 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