Skip to content

Instantly share code, notes, and snippets.

@arbabnazar
Created July 20, 2016 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arbabnazar/e965b94c2159082c93bad6b471b9c7d6 to your computer and use it in GitHub Desktop.
Save arbabnazar/e965b94c2159082c93bad6b471b9c7d6 to your computer and use it in GitHub Desktop.
add the github rsa public key to the known hosts
- name: Tell the host about our servers it might want to ssh to
known_hosts:
path: '/etc/ssh/ssh_known_hosts'
name: 'github.com'
key: "{{ lookup('pipe', 'ssh-keyscan -t rsa github.com') }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment