feat: Add variable to control certbot --dry-run flag

This commit is contained in:
gemini
2026-03-03 13:35:11 +01:00
parent 74853bdcca
commit 76a9c83f1c
2 changed files with 2 additions and 1 deletions

View File

@@ -3,5 +3,6 @@
become: true become: true
vars: vars:
bool_create_vhost: false bool_create_vhost: false
bool_cert_dry_run: true
roles: roles:
- nginx-proxy - nginx-proxy

View File

@@ -10,7 +10,7 @@
certbot certonly --standalone certbot certonly --standalone
--non-interactive --non-interactive
--agree-tos --agree-tos
--dry-run {{ '--dry-run' if bool_cert_dry_run | default(true) else '' }}
--email {{ certbot_email | default("admin@" + mydomain) }} --email {{ certbot_email | default("admin@" + mydomain) }}
-d {{ item.key + "." + mydomain if not item.value.internal else item.key + ".internal." + mydomain }} -d {{ item.key + "." + mydomain if not item.value.internal else item.key + ".internal." + mydomain }}
loop: "{{ servernames | dict2items }}" loop: "{{ servernames | dict2items }}"