aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Brian Bao <brianbao@users.noreply.github.com> 2019-02-17 03:29:16 -0500
committerGravatar Miek Gieben <miek@miek.nl> 2019-02-17 08:29:16 +0000
commit871bce3a234bd0bb00f202bc44fd6a058fe667cb (patch)
tree0172ab6dc80384e2b0047b7bf27c3b4fefef002c
parentde2f63d78747b48ae458b8f2c327a01e44cf725c (diff)
downloadcoredns-871bce3a234bd0bb00f202bc44fd6a058fe667cb.tar.gz
coredns-871bce3a234bd0bb00f202bc44fd6a058fe667cb.tar.zst
coredns-871bce3a234bd0bb00f202bc44fd6a058fe667cb.zip
Update A/PTR template README examples (#2553)
-rw-r--r--plugin/template/README.md12
1 files 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<b>[0-9]*)-(?P<c>[0-9]*)-(?P<d>[0-9]*)[.]example[.]$
- answer "{{ .Name }} 60 IN A 10.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}"
+ match (^|[.])ip-(?P<a>[0-9]*)-(?P<b>[0-9]*)-(?P<c>[0-9]*)-(?P<d>[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<d>[0-9]*)[.](?P<c>[0-9]*)[.](?P<b>[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<d>[0-9]*)[.](?P<c>[0-9]*)[.](?P<b>[0-9]*)[.](?P<a>[0-9]*)[.]in-addr[.]arpa[.]$
+ answer "{{ .Name }} 60 IN PTR ip-{{ .Group.a }}-{{ .Group.b }}-{{ .Group.c }}-{{ .Group.d }}.example."
}
}
~~~