When you use ansible-playbook with the -l option, if the hostname is not exactly the same, it fails.
Differences could be
-upper/lower case
-DNS aliasf
-qdn vs. just hostname
Would it make sense to change that so that, as long as it ends up resolving to the same name, it just works?