conteneurisation des DNS (2 versions de Dockerfile)
This commit is contained in:
45
dns-v1/secondary/Makefile
Normal file
45
dns-v1/secondary/Makefile
Normal file
@@ -0,0 +1,45 @@
|
||||
##############################################################################
|
||||
##
|
||||
## PowerDNS configuration
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Hosts
|
||||
|
||||
# ozgurluk
|
||||
# PRIMARY_IP = 5.196.91.229
|
||||
PRIMARY_IP = 129.18.0.42
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# 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/" \
|
||||
-e "s/@@PRIMARY_IP@@/$(PRIMARY_IP)/" $< >> $@ ; \
|
||||
done
|
||||
|
||||
pdns.d/main.conf: tpl/main.conf
|
||||
sed -e "s/@@SECONDARY_IPS@@/$(SECONDARY_IPS)/" $< > $@
|
||||
|
||||
$(GENERATED): Makefile
|
||||
Reference in New Issue
Block a user