ansible noob trying to ping hosts in hosts file

Hi there.

I just installed ansible on ubuntu 15 and am going through the getting started documentation found here: http://docs.ansible.com/ansible/intro_getting_started.html
I’ve added two servers to my hosts file… but when I try to ping them using ansible, it fails because the system is actually prompting me with this:

me@mydevbox:~$ ssh root@10.20.30.40
The authenticity of host ‘10.20.30.40 (10.20.30.40)’ can’t be established.
ECDSA key fingerprint is SHA256:OjtURI5grpQL+pS+OTwuoNryCDvPzk9p3HbZ00dY5f0.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/me/.ssh/known_hosts).
********************************* ATTENTION **********************************

  • Unauthorized access prohibited. Activity is logged. *

15:08:18 up 15 days, 18:31, 0 users, load average: 0.07, 0.06, 0.09
lab-box-1:~# exit

I’m trying to find a way to suppress that message … and i thought that by successfully logging into the box / server would get rid of it. but it keeps appearing.
Any suggestions ?

Have you added your public key in the ~/.ssh/authorized_keys file on the hosts to be allowed to log in with your ssh key?