Welcome
Detailed Description
Currently when using the config file, only a single hook of each type may be defined and it is applied to all certificate definitions/references.
Certbot at least has the option of hook directories, in which multiple hooks could be placed.
The hooks should support named references (just like challenges, accounts, etc.) and they should be a list, not a string scalar.
The following suggestion is backwards compatible by creating a new section, hooksets:
# (...)
hooksets:
# A named reference, 'one'.
one:
deploy:
- command: '/usr/bin/some_deploy_hook'
timeout: 2m
- command: '/usr/bin/some_other_deploy_hook'
timeout: 1m
# A hookset named 'two'.
two:
pre:
- command: '/usr/bin/a_pre_hook'
post:
- command: '/usr/bin/a_post_hook'
# (...)
certificates:
cert_foo:
# ( ... )
hooksets:
- one
cert_bar:
# ( ... )
hooksets:
- one
- two
Any/all hooks defined in hooks would still be applied globally, but hooksets would only be run if referenced by a certificate object.
This adds missing functionality, allows for far more modular deploys, and retains backwards compatibility.
Effective version of lego
v5.2.2
How do you use lego?
Binary
In which context are you using lego?
Personal and professional use
🌱 Supporting the Maintainers
Confirmation
Welcome
Detailed Description
Currently when using the config file, only a single hook of each type may be defined and it is applied to all certificate definitions/references.
Certbot at least has the option of hook directories, in which multiple hooks could be placed.
The hooks should support named references (just like challenges, accounts, etc.) and they should be a list, not a string scalar.
The following suggestion is backwards compatible by creating a new section,
hooksets:Any/all hooks defined in
hookswould still be applied globally, buthooksetswould only be run if referenced by acertificateobject.This adds missing functionality, allows for far more modular deploys, and retains backwards compatibility.
Effective version of lego
v5.2.2
How do you use lego?
Binary
In which context are you using lego?
Personal and professional use
🌱 Supporting the Maintainers
Confirmation