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]                  #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/a6755874-e642-471e-9a5b-e97273668ddb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to