hostname has to be exactly the same as in the host file

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?

No, because it also matches groups. There is no sane reason why
groups should be case sensitive, but we shouldn't break compat on
this.

And it doesn't fail, it works exactly like it should and doesn't match
anything :slight_smile: