Ansible Winrm connectivity issue - hosts behind Cyberark

I need to run ansible playbooks on windows hosts protected by CyberArk.

My main purpose of setting up Ansible is to mange the Windows VM’s and so far I was able to manage them without the Cyberark. With this setup I was able run Ansible playbook on all windows hosts.

Ubuntu Ansible version 2.9.6

Now, I am tasked to configure the Ansible which is behind Cyberark and even the Windows hosts are behind Cyberark.

Now the biggest challenge is having the communication between the Ansible and the Windows hosts. I am not able to ping to any hosts Windows or Linux box. Both outside or inside the Cyberark boundary.

Ping Error:

192.169.1.15 | UNREACHABLE! => {

“changed”: false,

“msg”: “ssl: HTTPSConnectionPool(host=‘192.168.1.15’, port=5986): Max retries exceeded with url: /wsman (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7fbc340f36d0>, ‘Connection to 192.168.1.15 timed out. (connect timeout=30)’))”,

“unreachable”: true

}

This is the result that I got while checking the connectivity to windows host:

nc -z -w1 192.168.1.15 5986;echo $?

result: 1

Could you please guide me through the steps or any documents which can help me bypassing the Cyberark.

Thanks,

Kumaresh

This issue is solved.

Issue was due to the firewall that was blocking port 5986 and 5985

Thanks,
Kumaresh