nickjj / ansible-letsencrypt

Install and auto-renew SSL certificates with Let's Encrypt and Ansible.
MIT License
29 stars 9 forks source link

Update acme-tiny script to support ACMEv2 protocol #6

Closed wolfsoft closed 4 years ago

wolfsoft commented 4 years ago

ACME v1 API is deprecated (https://community.letsencrypt.org/t/important-notice-to-acme-client-developers-regarding-acme-v1-deprecation/100795). Please, update upstream acme-tiny script to support ACME v2 API.

nickjj commented 4 years ago

Thanks a lot for the contribution. I just made this change the other day for a non-Ansible'ized version of acme-tiny and it was successful with V2.

Have you tested your PR to generate new certificates?

wolfsoft commented 4 years ago

Have you tested your PR to generate new certificates?

Thank you for feedback! Yes, I've successfully generated certificates with this PR today.

However, there is another issue with ansible version 2.9. The task "Complete trust chain" was failed, so I also commented out the line 98 in the file tasks/main.yml

when: (letsencrypt_register_output | changed) and (letsencrypt_register_output.stderr.endswith('Certificate signed!'))

to make it work. But seems it's another story.

Thank you so much for your efforts!

nickjj commented 4 years ago

In that line, what happens if you change | changed to is changed? That should fix it up.

wolfsoft commented 4 years ago

what happens if you change | changed to is changed? That should fix it up.

This completely solves the issue. Thank you again!

nickjj commented 4 years ago

Thanks again for the patch!

I'll cut a release sometime today.

nickjj commented 4 years ago

It's up on the Galaxy now with v0.3.1 but I did have to fix your v2 API endpoint URLs.