'Failed to connect to the host via PSRP

I try to run playbook on Ansible tower to connet to window server and got bug this

enter image description here

this my playbook

---
- name: Tranfer File From Jap
  hosts: tbdbmonprd
  tasks:
  - name: Test Connection
    win_ping:

this is my inventory

ansible_connection: psrp
ostype: windows
ansible_psrp_protocol: http
ansible_psrp_proxy: 'socks5h://unixsocket/tmp/mysocks-{{ account_code }}-{{ trans_num }}-{{ jh_socks_port }}'
ansible_ssh_common_args: '-oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oProxyCommand="ssh -i $JH2_SSH_PRIVATE_KEY -W %h:%p -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oProxyCommand=\"ssh -i $JH1_SSH_PRIVATE_KEY -W {{ jh2_ip }}:{{ jh2_ssh_port }} -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null {{ jh1_ssh_user }}@{{ jh1_ip }}\" {{ jh2_ssh_user }}@{{ jh2_ip }}"'
#ansible_ssh_common_args: '-oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oProxyCommand="ssh -i $JH3_SSH_PRIVATE_KEY -W %h:%p -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oProxyCommand=\"ssh -i $JH2_SSH_PRIVATE_KEY -W {{ jh3_ip }}:{{ jh3_ssh_port }} -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oProxyCommand=\\\"ssh -i $JH1_SSH_PRIVATE_KEY -W {{ jh2_ip }}:{{ jh2_ssh_port }} -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null {{ jh1_ssh_user }}@{{ jh1_ip }}\\\" {{ jh2_ssh_user }}@{{ jh2_ip }}\" {{ jh3_ssh_user }}@{{ jh3_ip }}"'
jumphost_credential: apc_2hop_jump_cred
blueid_shortcode: tbk
ilmt_scanner_install_path: "/var/opt/ansible/GTS/ILMT"
cit_scanner_install_path: "/var/opt/ansible/GTS/CIT"
ilmt_scanner_endpoint_id_backup_path: /var/tmp
hwsw_blueid_bac_id: BAC0000792
ansible_winrm_server_cert_validation: ignore

How can we it?



Solution 1:[1]

This connection plugin is part of ansible-core and included in all Ansible installations, but the below requirements are needed on the local controller node that executes this connection.

pypsrp>=0.4.0

Install pypsrp:

pip install pypsrp

To use the WinRM connection plugin, you need pywinrm.

See more at:

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 richardec