-
-
Notifications
You must be signed in to change notification settings - Fork 358
Description
Description
The role is currently not able to detect that a domain has been added for a certificate. Thus if we add a new domain to our list, nothing happens (generation is skipped).
What I would expect: the domain list change is detected and Certbot is run again (for e.g. for a renewal including the added domains).
Could we add a way to test for any change in the domain list and issue again the certificate when the list changed?
How to reproduce
First run the role with a domain list containing one to N items:
certbot_certs:
- domains:
- example1.com
- example2.com(Let the configuration being applied)
Then re-run the role after adding one to N domains:
certbot_certs:
- domains:
- example1.com
- example2.com
- example3.com
- example4.com(Here the certification will be skipped, resulting on example3.com and example4.com not being part of the certificate)
Implementation
This is due to the condition detecting that a certificate exists: it only checks we have a certificate of the name of the first domain.
| - name: Check if certificate already exists. |
This condition should be able to detect whether current existing certificate (if any) covers the same domains as the one provided by the role variables.