thefinn93 / ansible-letsencrypt

An ansible role to generate TLS certificates and get them signed by Let's Encrypt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

sbwoodside opened this issue · comments

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": []}

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

There is a bug report in Letsencrypt source: certbot/certbot#5111

Apparently it has been fixed.

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