我正在尝试使用一个ansible脚本来简单地从一个ansible控制服务器ping WINDOWS来宾,这是我的文件:
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": ""
}
我尝试卸载并重新安装WINRM and PYOPENSSL
以及所有支持的依赖项。
答案 0 :(得分:0)
如果您的ansible控制机器在Ubuntu上,请首先安装这些依赖项:
$sudo apt-get install libffi-dev
$pip install cryptography
答案 1 :(得分:-1)
尝试pip install pyopenssl --upgrade