thefinn93 / ansible-letsencrypt

An ansible role to generate TLS certificates and get them signed by Let's Encrypt
GNU General Public License v3.0
439 stars 122 forks source link

AttributeError: 'module' object has no attribute 'rand' #62

Open sbwoodside opened 6 years ago

sbwoodside commented 6 years ago

The python module OpenSSL has been upgraded and no longer contains the rand method. This makes this role break:

TASK [thefinn93.letsencrypt : Attempt to get the certificate using the standalone authenticator (in case eg the webserver isn't running yet)] ****************************
ok: [example.com]
ok: [example.com]
fatal: [example.com]: FAILED! => {"changed": true, "cmd": ["/usr/local/share/letsencrypt/env/bin/letsencrypt", "--agree-tos", "--text", "-d", "example.com", "--email", "info@medstack.co", "--expand", "-a", "standalone", "auth"], "delta": "0:00:01.612828", "end": "2017-09-16 00:51:06.894223", "failed": true, "rc": 1, "start": "2017-09-16 00:51:05.281395", "stderr": "Saving debug log to /var/log/letsencrypt/letsencrypt.log\nPlugins selected: Authenticator standalone, Installer None\nObtaining a new certificate\nPerforming the following challenges:\ntls-sni-01 challenge for example.com\nCleaning up challenges\nAn unexpected error occurred:\nAttributeError: 'module' object has no attribute 'rand'\nPlease see the logfiles in /var/log/letsencrypt for more details.", "stderr_lines": ["Saving debug log to /var/log/letsencrypt/letsencrypt.log", "Plugins selected: Authenticator standalone, Installer None", "Obtaining a new certificate", "Performing the following challenges:", "tls-sni-01 challenge for example.com", "Cleaning up challenges", "An unexpected error occurred:", "AttributeError: 'module' object has no attribute 'rand'", "Please see the logfiles in /var/log/letsencrypt for more details."], "stdout": "", "stdout_lines": []}
lnikell commented 6 years ago

Got the same error today on the new Digital Ocean instance with Ubuntu 17.04

vkomulai commented 6 years ago

There is a bug report in Letsencrypt source: https://github.com/certbot/certbot/issues/5111

Apparently it has been fixed.

sbwoodside commented 6 years ago

What's needed to pick up the fixed version in this ansible module?