What is the exact error message you are seeing?
Also try running ansible with -v or -vvvvvv to see connection debugging information.
Here are some more suggestions:
1/ In Powershell, running as Administrator, run
winrm get winrm/config
on a machine that can’t be connected to, and compare the same from a machine that can be connected to.
2/ Check the machines you cannot connect to have a current trust relationship with your domain controller (ensure you can log in with the same domain username and password as ansible is using).
Ensure the ansible_ssh_user has fully qualified domain name, and the domain part is in UPPER CASE LETTERS
ansible_ssh_user: testuser@MY.DOMAIN.COM
Not
ansible_ssh_user: testuser@MY
or
ansible_ssh_user: testuser@my.domain.com
3/ use kinit -C user@MY.DOMAIN.COM to acquire a kerberos ticket, and then use klist to examine the ticket.
4/ ensure the hosts you cannot connect to have clocks synchronized with your AD Domain controllers
5/ ensure the hosts you cannot connect to can be found using both hostname and ip address
That is: if you ping hostname, the response gives you an ip address. If you then use that ip address with nslookup, it must return the same hostname, or kerberos will not be able to connect.
For example
C:> ping windows-t1
Pinging windows-t1.my.domain.com [192.168.1.100] with 32 bytes of data:
Reply from 192.168.1.100:…
Control-C
^C
C:> nslookup 192.168.1.100
Server: dc01.my.domain.com
Address: 192.168.1.50
Name: windows-t1.my.domain.com
Address: 192.168.1.100
C:>
Hope this helps,
Jon