felixfontein / ansible-acme

An Ansible collection for managing TLS certificates with ACME CAs like Let's Encrypt.

Home Page:https://galaxy.ansible.com/ui/repo/published/felixfontein/acme/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support for `remaining_days` / `force` to renew only if needed

Kariton opened this issue · comments

I think it is feasible to have the ability to verify - if present in acme_certificate_keys_path - the remaining days
of requested certificates and / or force the renewal.

Is there something I missed - is it already possible?

I currently think that this can be added to this task:
- name: "Preparing challenges for {{ ', '.join(acme_certificate_domains + acme_certificate_ips) }}"

And a rescue task to skip further execution.

Or it may needs to be a separated task.

what do you think?
what would be the best approach to achieve such a "check"?

It's a bit more complicated than that, this needs to be checked before the current files are copied to the other location, for example. I'll take a look at this soon.

I've created an implementation for this in #28.