Skip to content

Commit 6fac1a3

Browse files
authored
Merge pull request #21 from T-Systems-MMS/fix_broken_autodns_wildcard_creation
fix broken AutoDNS wildcard creation #20
2 parents dbd84f6 + 8ef2dcd commit 6fac1a3

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

roles/letsencrypt/tasks/dns-challenge-autodns.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@
2525
"origin": "{{ item }}",
2626
"resourceRecordsAdd": [
2727
{
28-
"name": "_acme-challenge.{{ item }}",
28+
# "remove" '*.' from entry when it occurs. without it it would try to create a
29+
# record like _acme-challenge.*.example.com which is not allowed by AutoDNS
30+
# see: https://jinja.palletsprojects.com/en/master/templates/#replace
31+
# and: https://jbmoelker.github.io/jinja-compat-tests/filters/replace/#pattern
32+
"name": "_acme-challenge.{{ item | replace ('*.','') }}",
2933
"ttl": 60,
3034
"type": "TXT",
3135
"value": "{{ challenge['challenge_data'][item]['dns-01']['resource_value'] }}"
@@ -66,7 +70,7 @@
6670
"origin": "{{ item }}",
6771
"resourceRecordsRem": [
6872
{
69-
"name": "_acme-challenge.{{ item }}",
73+
"name": "_acme-challenge.{{ item | replace ('*.','') }}",
7074
"ttl": 60,
7175
"type": "TXT",
7276
"value": "{{ challenge['challenge_data'][item]['dns-01']['resource_value'] }}"

0 commit comments

Comments
 (0)