Your config should look like this:
ansible_user: username
#password goes here when you don't want to use -k option.
ansible_password: password
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_transport: kerberos
ansible_winrm_scheme: https
ansible_winrm_server_cert_validation: ignore
ansible_winrm_kerberos_delegation: true


And you need to run the script 
https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1
 First 

On Sunday, February 18, 2018 at 1:49:20 PM UTC+2, Sameer Modak wrote:
>
> Below is the configuration and its corresponding error,
>
> [windows]
> 192.168.1.102
> [windows:vars]
> ansible_ssh_user=smodak
> ansible_ssh_pass=******
> ansible_ssh_port=5986
> ansible_connection=winrm
> ansible_winrm_server_cert_validation=ignore
>
> =========================================================
>
> [root@hackerdev ansible]# ansible -vvv windows -m win_ping 
> Using /etc/ansible/ansible.cfg as config file
> META: ran handlers
> Using module file 
> /usr/lib/python2.7/site-packages/ansible/modules/windows/win_ping.ps1
> <192.168.1.102> ESTABLISH WINRM CONNECTION FOR USER: smodak on PORT 5986 
> TO 192.168.1.102
> 192.168.1.102 | UNREACHABLE! => {
>     "changed": false, 
>     "msg": "ssl: HTTPSConnectionPool(host='192.168.1.102', port=5986): Max 
> retries exceeded with url: /wsman (Caused by 
> NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 
> 0x3623650>: Failed to establish a new connection: [Errno 111] Connection 
> refused',))", 
>     "unreachable": true
> }
>
>
> What is going wrong ?????
>
> is it something missing on windows machine??????/
>

-- 
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/b37835e7-acd3-4462-a36a-6f6d8e859a29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to