Hi Amadin,
Follow below steps to to ping hosts:
Create ssh connection with host
And ping to the host using below command:
#ansible <host> -i <inventory-file> -m ping
and then run playbook on that host.
Or
You can avoid this by providing ansible_password (The password to use to authenticate to the host) in inventory
Hope this will work.
Regards,
Nivedita