Crypto Error On Ansible Playbook Start

I am on the devel branch of ansible and I just started getting this when I went to that branch:

`
[WARNING]: Optional dependency ‘cryptography’ raised an exception, falling back to ‘Crypto’

`

Probably something I need to install, just not sure what I need to install. Maybe I missed some docs though too. Thanks in advance!

Just for more information, this didn’t error out, it still ran my playbook, just noticed the warning and wasn’t sure if I needed to install something or if I could get rid of the warning in some manner. Thanks!

The warning message there is a little vague, especially considering
the names involved ('cryptography' and 'Crypto').

The gist is that importing the python 'cryptography' module failed.
More than likely because it is not installed.

To install it:

        'pip install cryptography'

Running in debug mode will show the stack trace (along with lots of other info):

        'ANSIBLE_DEBUG=1 ansible-playbook <... your args here ...>'

Looking at git history, it looks like the error message is a little
vague because the import can fail for a few different reasons.

I'll take a look at a better error message. I'll also see if it makes
sense to make that use '-vvv' to show the details
instead of debug.

This helped! I'd been running into the same thing with Ansible in a
virtualenv on EL7. Turns out that there was an ImportError because
cryptography required a newer version of setuptools. Why this wasn't
updated when cryptography was installed, I'm not sure - I'm far from a
pip master :slight_smile:

Interesting for me, as I have this in a Dockerfile to install the dependencies, I found that I need to do a pip install cryptography after I installed the source. I previously had the pip install step prior to the source install from git but once I moved that to after I no longer get this error. Thanks!