0

I'm attempting to get an ansible script working to simply ping WINDOWS guests from an ansible control server, here are my files :

hosts.yml

[winsrvrs]
server.domain.com

**group_vars/all.yml**
ansible_user: domain\\userID
ansible_password: password
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore


When attempting to run ansible-playbook -i hosts play.yml i get the following error: 

Exception: Cannot import pyOpenSSL

fatal: [wstnm.nml.com]: FAILED! => {
    "failed": true,
    "msg": "Unexpected failure during module execution.",
    "stdout": ""
}

I have tried to uninstall and reinstall both WINRM and PYOPENSSL along with all supporting dependencies.

2 Answers2

0

If your ansible control machine is on Ubuntu, install these dependencies first:

$sudo apt-get install libffi-dev
$pip install cryptography
-1

Try pip install pyopenssl --upgrade

Jeru Luke
  • 20,118
  • 13
  • 80
  • 87