Skip to content

Instantly share code, notes, and snippets.

@holms
Forked from maxim/task.yml
Last active December 13, 2016 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save holms/b5a6bdcbe35d067d6f5b to your computer and use it in GitHub Desktop.
Save holms/b5a6bdcbe35d067d6f5b to your computer and use it in GitHub Desktop.
Adding github to known_hosts with ansible
- name: ensure github.com is a known host
lineinfile:
dest: /root/.ssh/known_hosts
create: yes
state: present
line: "{{ lookup('pipe', 'ssh-keyscan -t rsa github.com') }}"
regexp: "^github\\.com"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment