From 871bce3a234bd0bb00f202bc44fd6a058fe667cb Mon Sep 17 00:00:00 2001 From: Brian Bao Date: Sun, 17 Feb 2019 03:29:16 -0500 Subject: [PATCH] Update A/PTR template README examples (#2553) --- plugin/template/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugin/template/README.md b/plugin/template/README.md index bcb5b2dd7..be099e70c 100644 --- a/plugin/template/README.md +++ b/plugin/template/README.md @@ -148,19 +148,19 @@ The regex-based version can do more complex matching/templating while zone-based . { proxy . 8.8.8.8 - # ip-a-b-c-d.example.com A a.b.c.d + # ip-a-b-c-d.example A a.b.c.d template IN A example { - match (^|[.])ip-10-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]$ - answer "{{ .Name }} 60 IN A 10.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}" + match (^|[.])ip-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]$ + answer "{{ .Name }} 60 IN A {{ .Group.a }}.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}" fallthrough } # d.c.b.a.in-addr.arpa PTR ip-a-b-c-d.example - template IN PTR 10.in-addr.arpa. { - match ^(?P[0-9]*)[.](?P[0-9]*)[.](?P[0-9]*)[.]10[.]in-addr[.]arpa[.]$ - answer "{{ .Name }} 60 IN PTR ip-10-{{ .Group.b }}-{{ .Group.c }}-{{ .Group.d }}.example.com." + template IN PTR in-addr.arpa { + match ^(?P[0-9]*)[.](?P[0-9]*)[.](?P[0-9]*)[.](?P[0-9]*)[.]in-addr[.]arpa[.]$ + answer "{{ .Name }} 60 IN PTR ip-{{ .Group.a }}-{{ .Group.b }}-{{ .Group.c }}-{{ .Group.d }}.example." } } ~~~