crypto error when running ansible

Hello,

I am on Centos 6.2 and when trying to run the ansible command i am
getting crypto errors. Anyone hit this issue before?

[root@dev-m01 ansible]# python -V
Python 2.6.6
[root@dev-m01 ansible]# cat /etc/redhat-release
CentOS release 6.2 (Final)
[root@dev-m01 ansible]#

ansible all -m ping --ask-pass
Traceback (most recent call last):
File "/usr/local/src/ansible/bin/ansible", line 27, in
import ansible.runner
File "/usr/local/src/ansible/lib/ansible/runner.py", line 34, in
import ansible.connection
File "/usr/local/src/ansible/lib/ansible/connection.py", line 26, in
import paramiko
File "/usr/lib/python2.6/site-packages/paramiko/init.py", line 69, in
from transport import randpool, SecurityOptions, Transport
File "/usr/lib/python2.6/site-packages/paramiko/transport.py", line
32, in
from paramiko import util
File "/usr/lib/python2.6/site-packages/paramiko/util.py", line 32, in
from paramiko.common import *
File "/usr/lib/python2.6/site-packages/paramiko/common.py", line 98,
in
from rng import StrongLockingRandomPool
File "/usr/lib/python2.6/site-packages/paramiko/rng.py", line 22, in
from Crypto.Util.randpool import RandomPool as RandomPool
File "/usr/lib64/python2.6/site-packages/Crypto/Util/randpool.py",
line 30, in
import Crypto.Random
File "/usr/lib64/python2.6/site-packages/Crypto/Random/init_.py", line
29, in
from Crypto.Random import _UserFriendlyRNG
File "/usr/lib64/python2.6/site-packages/Crypto/Random/
_UserFriendlyRNG.py", line 38, in
from Crypto.Random.Fortuna import FortunaAccumulator
File "/usr/lib64/python2.6/site-packages/Crypto/Random/Fortuna/
FortunaAccumulator.py", line 39, in
import FortunaGenerator
File "/usr/lib64/python2.6/site-packages/Crypto/Random/Fortuna/
FortunaGenerator.py", line 34, in
from Crypto.Util.number import ceil_shift, exact_log2, exact_div
File "/usr/lib64/python2.6/site-packages/Crypto/Util/number.py", line
56, in
if _fastmath is not None and not _fastmath.HAVE_DECL_MPZ_POWM_SEC:
AttributeError: 'module' object has no attribute
'HAVE_DECL_MPZ_POWM_SEC'

Thanks for posting here.

Yeah as I replied on the github ticket, I am developing on CentOS 6.2 + EPEL and haven’t seen this. Curious if others have and what may be special
about configurations and environments.

Is there a way to confirm the package versions needed for ansible
(crypto, jinja2, etc) ?

This is my crypto version, is yours the same ?

# yum list | grep python | grep crypto
python-crypto.x86_64
2.0.1-22.el6 @base

Is there a way to confirm the package versions needed for ansible
(crypto, jinja2, etc) ?

I’m strongly against hard dependencies for such things when we don’t have a reason for specific deps.

This is my crypto version, is yours the same ?

yum list | grep python | grep crypto

python-crypto.x86_64
2.0.1-22.el6 @base

Exact same version here.

python-paramiko is 1.7.5-2.1.el6
python.i686 2.6.6-29.el6

No other modules installed outside of RPM, etc?

not sure how do i tell ?

If you haven’t done anything you remember, it’s probably normal :slight_smile:

any chance it has to do with the version of ssl ?

openssl.i686
1.0.0-20.el6_2.4 @update
openssl.x86_64
1.0.0-20.el6_2.4 @update
openssl-devel.x86_64
1.0.0-20.el6_2.4 @update