From fb0dbf28a0e7979050858256d2040d734b282afe Mon Sep 17 00:00:00 2001 From: Niklas Yann Wettengel Date: Sat, 22 Jan 2022 19:59:11 +0100 Subject: new net with nat64 --- roles/install_bind/tasks/main.yml | 10 ++++++++++ roles/install_bind/templates/ipv6.conf.j2 | 2 ++ roles/install_bind/templates/named.conf.j2 | 1 + 3 files changed, 13 insertions(+) create mode 100644 roles/install_bind/templates/ipv6.conf.j2 (limited to 'roles/install_bind') diff --git a/roles/install_bind/tasks/main.yml b/roles/install_bind/tasks/main.yml index a7391e5..a11d247 100644 --- a/roles/install_bind/tasks/main.yml +++ b/roles/install_bind/tasks/main.yml @@ -11,6 +11,16 @@ owner: named group: named +- name: create systemd-folder + file: + path: /etc/systemd/system/named.service.d + state: directory + +- name: bind ip override + template: + src: ipv6.conf.j2 + dest: /etc/systemd/system/named.service.d/ipv6.conf + - name: bind config template: src: named.conf.j2 diff --git a/roles/install_bind/templates/ipv6.conf.j2 b/roles/install_bind/templates/ipv6.conf.j2 new file mode 100644 index 0000000..0bc8416 --- /dev/null +++ b/roles/install_bind/templates/ipv6.conf.j2 @@ -0,0 +1,2 @@ +[Service] +ExecStartPre=/usr/bin/ip addr replace {{ dns_ip }}/128 dev lo diff --git a/roles/install_bind/templates/named.conf.j2 b/roles/install_bind/templates/named.conf.j2 index 25d3470..352c1fa 100644 --- a/roles/install_bind/templates/named.conf.j2 +++ b/roles/install_bind/templates/named.conf.j2 @@ -10,6 +10,7 @@ options { auth-nxdomain no; # conform to RFC1035 listen-on-v6 { + 2a03:2260:1016::53; {% for site in sites %} {{ site.bat_ipv6 }}; {% endfor %} -- cgit v1.2.3-54-g00ecf