Add lego certificate service to ansible

This commit is contained in:
Tobias Reisinger 2023-12-20 16:00:03 +01:00
parent 5246a6b101
commit 068a8e2cd7
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
13 changed files with 212 additions and 0 deletions
roles/lego/vars

31
roles/lego/vars/main.yml Normal file
View file

@ -0,0 +1,31 @@
---
lego_svc:
name: lego
lego_env:
ACME_DNS_API_BASE: https://{{ acme_dns.host }}
ACME_DNS_STORAGE_PATH: /config/acme-dns-accounts.json
LEGO_EMAIL: "{{ admin_email }}"
LEGO_PATH: /data
lego_compose:
watchtower: false
network: false
image: goacme/lego
volumes:
- ./config:/config:ro
- "{{ certificates_path }}:/certificates"
- data:/data
file:
services:
app:
restart: never
network_mode: "host"
entrypoint:
- /lego
- --accept-tos
- --email={{ admin_email }}
- --dns=acme-dns
volumes:
data: