conteneurisation des DNS (2 versions de Dockerfile)
This commit is contained in:
44
dns-v1/primary/Makefile
Normal file
44
dns-v1/primary/Makefile
Normal file
@@ -0,0 +1,44 @@
|
||||
##############################################################################
|
||||
##
|
||||
## PowerDNS configuration
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Hosts
|
||||
|
||||
# svoboda, yuuai
|
||||
# SECONDARY_IPS = 129.104.30.37 129.104.30.32
|
||||
SECONDARY_IPS = 129.18.0.43 129.18.0.45
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# Computed variables
|
||||
#
|
||||
|
||||
GENERATED = bindbackend.conf pdns.d/main.conf
|
||||
|
||||
DOMAINS := $(patsubst pri/%,%,$(wildcard pri/*))
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# Rules
|
||||
#
|
||||
|
||||
all: $(GENERATED)
|
||||
.PHONY: all
|
||||
|
||||
clean:
|
||||
$(RM) $(GENERATED)
|
||||
.PHONY: clean
|
||||
|
||||
bindbackend.conf: tpl/bindbackend.conf.template
|
||||
$(RM) $@
|
||||
set -e; \
|
||||
for fqdn in $(DOMAINS); do \
|
||||
sed -e "s/@@FQDN@@/$$fqdn/" $< >> $@ ; \
|
||||
done
|
||||
|
||||
pdns.d/main.conf: tpl/main.conf.template
|
||||
sed -e "s/@@SECONDARY_IPS@@/$(SECONDARY_IPS)/" $< > $@
|
||||
|
||||
$(GENERATED): Makefile
|
||||
4
dns-v1/primary/bindbackend.conf.template
Normal file
4
dns-v1/primary/bindbackend.conf.template
Normal file
@@ -0,0 +1,4 @@
|
||||
zone "@@FQDN@@" {
|
||||
type primary;
|
||||
file "/etc/powerdns/pri/@@FQDN@@";
|
||||
};
|
||||
9
dns-v1/primary/main.conf.template
Normal file
9
dns-v1/primary/main.conf.template
Normal file
@@ -0,0 +1,9 @@
|
||||
# Here come the local changes the user made, like configuration of
|
||||
# the several backends that exist.
|
||||
|
||||
primary=yes
|
||||
|
||||
disable-axfr=no
|
||||
allow-axfr-ips=@@SECONDARY_IPS@@
|
||||
|
||||
bind-dnssec-db=/etc/powerdns/db/bind-dnssec-db.sqlite3
|
||||
Reference in New Issue
Block a user