From: Tollef Fog Heen Date: Sat, 12 Aug 2017 14:21:08 +0000 (+0200) Subject: Add function to emit the correct geoip format for bind versions X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=9ee1b66459e8dceb69c23ea37a9ca027326c3d75;hp=971573de556cd68ce1ada54f7a07c366c69ed953;p=mirror%2Fdsa-puppet.git Add function to emit the correct geoip format for bind versions BIND 9.9 and BIND 9.10 have different formats for geoip. Add a function that DTRT, and test it slightly before doing it to all countries. --- diff --git a/modules/named/files/common/named.conf.acl b/modules/named/files/common/named.conf.acl index 5726379df..5efaab5d8 100644 --- a/modules/named/files/common/named.conf.acl +++ b/modules/named/files/common/named.conf.acl @@ -3,9 +3,18 @@ // USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git // +<%- def country +def country(c) + if scope.call_function('versioncmp', [@lsbmajdistrelease, '9']) <= 0 + "geoip country " + c + else + "country_" + c + end +end %-> + // Africa acl AF { - country_AO; + <%= country "AO" %>; country_BF; country_BI; country_BJ;