X-Git-Url: https://git.ralfj.de/ansible.git/blobdiff_plain/6fe1d02b761553a93b11c0029b8c4f3237837dba..a48a0035e2c2e0ce00a8d08961536bcd3290c1e2:/roles/bind/files/Makefile diff --git a/roles/bind/files/Makefile b/roles/bind/files/Makefile new file mode 100644 index 0000000..b8db07b --- /dev/null +++ b/roles/bind/files/Makefile @@ -0,0 +1,19 @@ +include Makefile.conf + +user ?= bind +zonemaker ?= zonemaker/zonemaker +RNDC ?= /usr/sbin/rndc + +# heres comes the magic +zonefiles = $(addprefix db.,${zones}) +all: ${zonefiles} +.PHONY: all + +db.%: db.%.py + @echo $* $< $@ + @sudo -u ${user} ${zonemaker} $< > $@ || rm -f $@ + @cat $@ + @echo + @${RNDC} reload $* # this only returns errors if the zone had not previously been loaded :-/ + @sleep 1 + @fgrep 'zone '$*'/IN' /var/log/syslog | tail -n 5