ansible and active directory

Can someone explain me how to use an active directory user to connect to the machines with ansible please ?

i joined all my computers on the AD, on my ansible machine i have this:

cat /etc/ansible/group_vars/windows-domain.yml

#it is suggested that these be encrypted with ansible-vault:
ansible_ssh_user: jerome@MONDOM.COM #jerome is in the ad admin group
ansible_ssh_pass: password
ansible_ssh_port: 5986
ansible_connection: winrm

cat /etc/ansible/hosts

[windows-domain]
w7.MONDOM.COM

But when i do this i get this error :

ANSIBLE_LOAD_CALLBACK_PLUGINS=1 ansible windows-domain -m win_ping -vvvv

<w7.MONDOM.COM> ESTABLISH WINRM CONNECTION FOR USER: on PORT 5986 TO w7.MONDOM.COM
<w7.MONDOM.COM> WINRM CONNECT: transport=plaintext endpoint=https://w7.MONDOM.COM:5986/wsman
<w7.MONDOM.COM> WINRM CONNECTION ERROR: 401 Unauthorized.
w7.MONDOM.COM | FAILED => 401 Unauthorized.

(it works fine if i use the local admin user)

Jerome, I just wrote about this a feew weeks back. See if this walkthru helps you:

http://hindenes.com/trondsworking/2015/07/27/ansible-and-windows-configuring-kerberosactive-directory-authentication/