Closed esnalabu closed 1 year ago
Encountered the same problem, but was able to work around it when I saw the code @esnalabu referenced, specifically the line below.
path: /etc/letsencrypt/live/{{ cert_item.domains | first | replace('*.', '') }}/cert.pem
The domains list is piped through the first
command, which means only the first domain in the list is checked. So, I moved the new domain name to the top and a certificate was generated for it.
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.
This issue is still present.
Also this is a duplicate of https://github.com/geerlingguy/ansible-role-certbot/issues/113
Still having this issue
When adding a domain to an existing cert_item, the role does not generate a new cert with the updated domains:
For example going from this:
to this:
...does not work.
This is due to the check for whether or not to generate certs is only checking if there is a file with the correct name/path.
It might make sense to allow the user to "force" regeneration using a variable, or maybe the role could test for aliases in the certificates instead of just the existence of the file. In any event, the role should be able to revoke the existing certificates after deleting and creating new ones.