Cannot use signature-based authentication because pyopenssl is not available

228 views
Skip to first unread message

Antien Ho

unread,
Sep 24, 2019, 7:23:31 PM9/24/19
to Ansible Project
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
Collecting six>=1.5.2 (from pyopenssl)
Collecting cryptography>=2.3 (from pyopenssl)
Collecting cffi!=1.11.3,>=1.8 (from cryptography>=2.3->pyopenssl)
Collecting asn1crypto>=0.21.0 (from cryptography>=2.3->pyopenssl)
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 
 

Dick Visser

unread,
Sep 24, 2019, 11:58:33 PM9/24/19
to ansible...@googlegroups.com
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 

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/fa858c8b-c931-4795-93b4-5f7220ab1183%40googlegroups.com.
--
Sent from a mobile device - please excuse the brevity, spelling and punctuation.

Vladimir Botka

unread,
Sep 25, 2019, 12:29:08 AM9/25/19
to Dick Visser, ansible...@googlegroups.com
On Wed, 25 Sep 2019 05:58:08 +0200
Dick Visser <dick....@geant.org> wrote:
> 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).
>
> On Wed, 25 Sep 2019 at 01:23, Antien Ho <anti...@gmail.com> wrote:
> > environment: windows 10 Ubuntu 18.04 LTS.
> > python version as standard:
> > ansible-playbook 2.8.5
> > python version = 2.7.15+ (default, Jul 9 2019, 16:51:35) [GCC 7.4.0]
> > I always getting the topic error. pyopenssl is not available.
> > I did install the pyopenssl with "pip3 install pyopenssl"..as latest

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
Reply all
Reply to author
Forward
0 new messages