mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-13 15:13:33 +01:00
Call deploy_cert() in hooks-file with alias #384
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @muffl0n on GitHub (Nov 1, 2018).
When defining a SAN-certificate in domains.txt it's possible to specify an alias. E.g.
Unfortunately it's not possible to use the alias ("example.com" in this case) in the hooks-file.
Our use case is: In deploy_cert() we update the certificate in our loadbalancer. The only "name" I can use for referencing the certificate in the lb is DOMAIN. So I have no chance to name the certificate "le-cert-example.com" because the hooks-file does not know about the alias.
My workaround in deploy_cert() for the time being is
@lukas2511 commented on GitHub (Nov 1, 2018):
There should already be a variable
alias(lowercase) exported to the hooks environment ;)@muffl0n commented on GitHub (Nov 1, 2018):
Your're right, thank you very much! Just found the commit for that:
b6b56d0df7Didn't find anything in the documentation, though. Is there a reason why it's not a parameter? Would be way more explicit, feels a bit "magical" this way.
@lukas2511 commented on GitHub (Nov 1, 2018):
It's not a parameter because I didn't want to change the syntax. Aliases were mostly designed for use with edge-cases on some wildcard certificates so they are not really a "first class feature".
Documentation needs a lot of work, there's a lot of things missing but I don't want to just throw everything in as it might result in more confusion. It's something I'm trying to work on but I didn't really find the time yet.
@muffl0n commented on GitHub (Nov 1, 2018):
Sounds reasonable! 👍 Thank you very much for your great work!