unable to resolve inventory_hostname via azure dynamic inventory on windows hosts execution

Ansbile version 2.5.1.1
while executing ansible playbook via dynamic inventory of azure failing in resolving inventory_hostname in the wsman url. if i try to resolve hosts via local inventory file it is working absolutly fine

<inventory_hostname> WINRM CONNECT: transport=kerberos endpoint=https://inventory_hostname:5986/wsman
<inventory_hostname> WINRM CONNECTION ERROR: authGSSClientStep() failed: ((‘Unspecified GSS failure. Minor code may provide more information’, 851968), (‘Server nound in Kerberos database’, -1765328377))

If the File “/home/adminuser/.local/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py”,

remote_addr changed in this module to hostname of windows machine, it starts working absolutly fine.