Hi
Jørgen,
By default, ansible uses the default host file specified @ /etc/hosts (I'm assuming you are using linux here). If you specified a separate host file, you need to tell ansible its location with the -i option.
Also, do you think you can share the content of your host file ? It has to be something like this : (the IP adress is fictive and for demonstration purposes only)
[group_name]
custom_hostname ansible_host=192.168.1.2
Or
[group_name]
192.168.1.2