I have ansible version 2.4.2. Trying to integrate Ansible contorl machine (Linux) with Windows. Checked and installed all pre-requesties.
Getting below error while connecting to windows machine
(ansible) -bash-4.2$ ansible *<windowsservername>* -i inventory -m win_ping
*windowsservername* | FAILED! => {
"msg": "winrm or requests is not installed: No module named xmltodict"
}
PFB the packages
(ansible) -bash-4.2$ pip freeze | grep -i xmltodict
xmltodict==0.11.0
(ansible) -bash-4.2$ pip freeze | grep -i winrm
pywinrm==0.3.0
I am new to ansible, please help on this issue.
It allows you to invoke commands on target Windows machines from any machine that can run Python. WinRM allows you to perform various management tasks remotely. These include, but are not limited to: running batch scripts, powershell scripts, and fetching WMI variables.
It worked for me . I reinstalled winrm on the controller machine using : pip install --ignore-installed pywinrm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With