Simplify caddy config
Move double conditional checking of email provision and staging environment into single check.
This commit is contained in:
parent
7eeeec0489
commit
80185e39dd
1 changed files with 4 additions and 11 deletions
|
|
@ -47,19 +47,13 @@
|
||||||
{
|
{
|
||||||
"subjects": [],
|
"subjects": [],
|
||||||
"issuers": [
|
"issuers": [
|
||||||
|
{
|
||||||
{% if caddy_tls_use_staging is sameas true %}
|
{% if caddy_tls_use_staging is sameas true %}
|
||||||
{
|
|
||||||
"ca": "https://acme-staging-v02.api.letsencrypt.org/directory",
|
"ca": "https://acme-staging-v02.api.letsencrypt.org/directory",
|
||||||
{%- if caddy_email is not undefined and not none %}
|
{% endif %}
|
||||||
|
{%- if caddy_email is not undefined and not none %}
|
||||||
"email": "{{ caddy_email }}",
|
"email": "{{ caddy_email }}",
|
||||||
{% endif %}
|
{% endif %}
|
||||||
"module": "acme"
|
|
||||||
}
|
|
||||||
{% else %}
|
|
||||||
{
|
|
||||||
{%- if caddy_email is not undefined and not none %}
|
|
||||||
"email": "{{ caddy_email }}",
|
|
||||||
{% endif %}
|
|
||||||
"module": "acme"
|
"module": "acme"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -68,7 +62,6 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
"module": "zerossl"
|
"module": "zerossl"
|
||||||
}
|
}
|
||||||
{% endif %}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue