I found the answer, it seems that i wasn’t allowed to use hostnames in the Ansible hosts file (don’t know why) . I changed to IP’s and now is working.
Sounds like you have a DNS issue.
You are definitely allowed to use hostnames.
Well, hostnames are certainly allowed in the host file. I think your system likely had some issue resolving the hostnames.
Romeo