I am new to Ansible and trying to connect to windows machine using Ansible. I am getting following error:
`
cic-svr-reiis02.corp.exlservice.com | UNREACHABLE! => {
“changed”: false,
“msg”: “plaintext: HTTPConnectionPool(host=‘cic-svr-reiis02.corp.exlservice.com’, port=5985): Max retries exceeded with url: /wsman (Caused by NewConnectionError(‘<requests.packages.urllib3.connection.HTTPConnection object at 0x3d76050>: Failed to establish a new connection: [Errno 111] Connection refused’,))”,
“unreachable”: true
}
`
I have made changes in these three files.
- Inventory:
[windows] xxx.xxx.xxx.com
1.
- Krb5.conf
[realms] XXX.XXX.COM = { kdc = xxx.xxx.xxx.com admin_server = xxx.xxx.xxx.com } [domain_realm] .xxx.xxx.com = XXX.XXX.COM
1.
-
group_vars/windows.yml
ansible_ssh_user: user ansible_ssh_pass: password ansible_ssh_port: 5985 ansible_connection: winrm
I am new to this and may have made mistake in the process of connectivity. Any help would be appreciated. Thanks in advance.