how to add github to known hosts

I’ve been using the following to add github to my known hosts:

shell: ssh-keyscan -H github.com >> ~/.ssh/known_hosts

…but it started failing, here’s the result:

https://gist.github.com/uunsamp/28ae7967222f757c9c37

I mentioned this in IRC, and someone linked to a blog post where
the author is doing something similar:

https://juriansluiman.nl/article/151/managing-ssh-known-hosts-with-ansible

I tried what the author was doing and I had the same results as previously:

https://gist.github.com/uunsamp/1408198189d58002543a

I could use some help on this, hope someone here as ran into this issue previously.

There’s an accept_hostkey parameter to the git module which is a good thing to use in this case when adding something for purposes of using it with git.

(I would ask that folks please do not use gist for short things on the mailing list, it limits ability to search for problems later on Google and requires opening a giant sum of tabs…)