The warning is not from ansible, but from sudo, which ansible is using at your request.
Sudo is trying to verify the hostname and spurting the message into stdout, since Ansible is executing your script under sudo it gets both outputs and cannot distinguish which came from which. The common solution for this sudo issue is adding the host to dns or /etc/hosts on the machine, in this case it seems that DNS is being slow to propagate. Sadly this error message varies a lot across sudo installations/versions/etc, so it is not easy to filter out universally. I'm not sure there is much we can do on the ansible side. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8mN4pSRxUmK_fNOOqbXfueY0JcmKGCrV_OOr8h1B9hooA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.