Cannot use signature-based authentication because pyopenssl is not available

environment: windows 10 Ubuntu 18.04 LTS.
python version as standard:

ansible-playbook 2.8.5
config file = /etc/ansible/ansible.cfg
configured module search path = [u’/home/antienho/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 2.7.15+ (default, Jul 9 2019, 16:51:35) [GCC 7.4.0]
Using /etc/ansible/ansible.cfg as config file

in a ACI environment, and installed the openssl cert key with .pem and .key
by following
openssl req -new -newkey rsa:1024 -days 36500 -nodes -x509 -keyout antien.key -out antien.pem -subj ‘/CN=Antien/O=conreslab/C=US’.

the .pem is properly installed in ACI.
however when run the simple yml file.
I always getting the topic error. pyopenssl is not available.

I did install the pyopenssl with “pip3 install pyopenssl”…as latest pyopenssl 19.0.0 version…see below:

pip3 install pyopenssl
Collecting pyopenssl
Using cached https://files.pythonhosted.org/packages/01/c8/ceb170d81bd3941cbeb9940fc6cc2ef2ca4288d0ca8929ea4db5905d904d/pyOpenSSL-19.0.0-py2.py3-none-any.whl
Collecting six>=1.5.2 (from pyopenssl)
Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting cryptography>=2.3 (from pyopenssl)
Using cached https://files.pythonhosted.org/packages/97/18/c6557f63a6abde34707196fb2cad1c6dc0dbff25a200d5044922496668a4/cryptography-2.7-cp34-abi3-manylinux1_x86_64.whl
Collecting cffi!=1.11.3,>=1.8 (from cryptography>=2.3->pyopenssl)
Using cached https://files.pythonhosted.org/packages/5f/bf/6aa1925384c23ffeb579e97a5569eb9abce41b6310b329352b8252cee1c3/cffi-1.12.3-cp36-cp36m-manylinux1_x86_64.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=2.3->pyopenssl)
Using cached https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl
Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography>=2.3->pyopenssl)
Installing collected packages: six, pycparser, cffi, asn1crypto, cryptography, pyopenssl
Successfully installed asn1crypto-0.24.0 cffi-1.12.3 cryptography-2.7 pycparser-2.19 pyopenssl-19.0.0 six-1.12.0

I will post any addition information if required. Any suggestions are appreciated.

Thanks

Antien

Your ansible is using python2.

So either install ansible using python3, or install pyopenssl for python2 (if that’s possible at all, can’t tell from here).

Dick

Install PyOpenSSL on the remote host. Quoting from the doc:

  PyOpenSSL is "needed on the host that executes this module"
  https://docs.ansible.com/ansible/latest/modules/openssl_certificate_module.html

What Python shall be used on the remote host depends how the packages have
been built and what packages were installed. For example FreeBSD works fine
with both

  py27-openssl-18.0.0 Python interface to the OpenSSL library
  py36-openssl-17.5.0_1 Python interface to the OpenSSL library

If you have to use pip to install the packages make sure the paths are set
properly and Ansible is able to use it.

Cheers,

  -vlado