Hello,
I have a Centos VM which is cut off from the internet. It does have Ansible installed but does not have pywinrm installed. It did not even have pip installed.
So I installed pip offline, basically downloaded the tar.gz and copied to the VM using WinSCP. After which i installed using “python setup.py install” command
I tried doing the same of pywinrm-0.3.0, but there are way too many dependencies for ntlm etc that the installation aborts, because it looks to go to the web and does not find.
So right now i am stuck where my small little playbook throws this error. Please can someone assist? Thanks in advance
ansible web -i inventory.yml -m win_ping
10.xxx.xxx.xx | FAILED! => {
“msg”: “winrm or requests is not installed: No module named winrm”
}
Thanks in advance for your assistance
You will either have to repeat this for every dependency you come across, or address your inability to access the internet.
It depends on your local situation which option is the shortest path to success.
Dick
Thank you sir.
I had actually done it and was still getting the error. I then realised i had to do sudo
sudo ansible web -i inventory.yml -m win_ping
10.xxx.xxx.xx | FAILED! =>SUCCESS => {
“changed”: false,
“ping”: “pong”
}
This is for anyone who wants to install WinRM offline. This is what you do.
- Download pywinrm from web - https://pypi.org/project/pywinrm/#files - It has a tar file and the whl file.
- Using WinSCP or any other tool, push it to your linux box, into a directory say WinRM
- Then go to the command line in linux and go to WinRM directory
- Untar the tar.gz file using “tar -xvzf pywinrm-0.3.0.tar.gz”
- cd pywinrm-0.3.0
- sudo python setup.py install
- This would fail on dependencies again, if you do not have an internet connection, so please go to pypi.org and search for the following packages and repeat the same install, you should eventually be good.
gssapi-1.5.0.tar.gz
MarkupSafe-1.1.0.tar.gz
python-ntlm3-1.0.2.tar.gz
python_ntlm3-1.0.2-py2.py3-none-any.whl
requests-2.9.1-py2.py3-none-any.whl
requests-2.9.1.tar.gz
requests-credssp-1.0.2.tar.gz
requests-kerberos-0.12.0.tar.gz
requests_credssp-1.0.2-py2.py3-none-any.whl
requests_kerberos-0.12.0-py2.py3-none-any.whl
requests_ntlm-0.3.0-py2.py3-none-any.whl
requests_ntlm-0.3.0.tar.gz
six-1.4.0.tar.gz
xmltodict-0.11.0-py2.py3-none-any.whl
xmltodict-0.11.0.tar.gz
Thanks!