Add sites to /etc/ssh/ssh_known_hosts for Debian/Ubuntu
First of all you should install Ansible on your machine, official docs should help you with that.
ansible-galaxy install igor_mukhin.ssh_known_hosts
Lets add github.com and bitbucket.org to known hosts:
# playbook.yml
vars:
ssh_known_hosts:
- github.com
- { host: bitbucket.org, type: rsa }
roles:
- igor_mukhin.ssh_known_hosts