r/lego-nginx: Configure LEGO for nginx

The *lego-nginx* role automates obtaining certificates for *nginx* via
ACME using `lego`.  It generates a shell script with the appropriate
arguments for `lego run`, runs it once to obtain a certificate
initially, then schedules it to run periodically via a systemd timer
unit. Using `lego`'s "hook" capability, the script signals the `nginx`
server process to reload.  This uses `doas` for now, but could be
adapted easily to use `sudo`, if the need ever arises.
This commit is contained in:
2025-07-08 11:29:36 -05:00
parent 0393f074a4
commit 6d1442faf0
11 changed files with 194 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
dependencies:
- role: lego
tags:
- lego