Hi All,
i am facing some issue while trying to connect to windows.
please help.
ansible windows -i hosts -m win_ping
xxxxx | FAILED! => {
“msg”: “winrm or requests is not installed: No module named winrm”
}
i can see winrm is installed.
output of pip list:
Package Version
ansible-tower-cli 3.3.4
asn1crypto 0.24.0
backports.ssl-match-hostname 3.7.0.1
bcrypt 3.1.6
cached-property 1.5.1
certifi 2019.9.11
cffi 1.12.3
chardet 3.0.4
Click 7.0
colorama 0.4.1
cryptography 2.7
docker 3.7.3
docker-compose 1.24.1
docker-pycreds 0.4.0
dockerpty 0.4.1
docopt 0.6.2
enum34 1.1.6
functools32 3.2.3.post2
idna 2.7
ipaddress 1.0.22
jsonschema 2.6.0
ntlm-auth 1.4.0
paramiko 2.4.2
pip 19.2.3
pyasn1 0.4.5
pycparser 2.19
PyNaCl 1.3.0
pyOpenSSL 19.0.0
pywinrm 0.3.0
PyYAML 3.13
requests 2.20.1
requests-ntlm 1.1.0
setuptools 0.9.8
six 1.12.0
texttable 0.9.1
urllib3 1.24.3
websocket-client 0.56.0
xmltodict 0.12.0
Python 2.7.13 (default, May 23 2018, 14:21:55)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
import winrm
import requestsexit()
ansible --version
ansible 2.7.12
config file = /etc/ansible/ansible.cfg
configured module search path = [u’/root/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible
python version = 2.7.13 (default, May 23 2018, 14:21:55) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]