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/ On Saturday, August 15, 2015 at 3:46:48 PM UTC+2, jerome jarr wrote: > > 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: [email protected] <javascript:> > #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) > > > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4f2a61a2-0e42-4be3-a785-cbd18eea4523%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
