diff options
Diffstat (limited to 'modules/bind')
-rw-r--r-- | modules/bind/manifests/init.pp | 5 | ||||
-rw-r--r-- | modules/bind/templates/named_master.conf | 10 | ||||
-rw-r--r-- | modules/bind/templates/named_slave.conf | 12 |
3 files changed, 22 insertions, 5 deletions
diff --git a/modules/bind/manifests/init.pp b/modules/bind/manifests/init.pp index 585c04fb..7bc7a8f0 100644 --- a/modules/bind/manifests/init.pp +++ b/modules/bind/manifests/init.pp @@ -19,7 +19,6 @@ class bind { } } - file { '/var/lib/named/etc/named.conf': ensure => present, owner => root, @@ -63,12 +62,16 @@ class bind { class bind_master inherits bind_base { + Tld_redirections::Domain <<| |>> + + $managed_tlds = list_exported_ressources('Tld_redirections::Domain') file { '/var/lib/named/etc/named.conf': content => template("bind/named_base.conf", "bind/named_master.conf"), } } class bind_slave inherits bind_base { + $managed_tlds = list_exported_ressources('Tld_redirections::Domain') file { '/var/lib/named/etc/named.conf': content => template("bind/named_base.conf", "bind/named_slave.conf"), } diff --git a/modules/bind/templates/named_master.conf b/modules/bind/templates/named_master.conf index 92cb40b7..d0c20126 100644 --- a/modules/bind/templates/named_master.conf +++ b/modules/bind/templates/named_master.conf @@ -4,12 +4,18 @@ zone "mageia.org" IN { allow-update { none; }; }; -zone "mageia.fr" IN { +<% +for tld in managed_tlds +%> + +zone "mageia.<%= tld %>" IN { type master; - file "master/mageia.fr.zone"; + file "master/mageia.<%= tld %>.zone"; allow-update { none; }; }; +<% end %> + zone "7.0.0.0.2.0.0.0.8.7.1.2.2.0.a.2.ip6.arpa" IN { type master; file "reverse/7.0.0.0.2.0.0.0.8.7.1.2.2.0.a.2.ip6.arpa.zone"; diff --git a/modules/bind/templates/named_slave.conf b/modules/bind/templates/named_slave.conf index d3a04085..b1828e5c 100644 --- a/modules/bind/templates/named_slave.conf +++ b/modules/bind/templates/named_slave.conf @@ -4,12 +4,20 @@ zone "mageia.org" IN { allow-update { 212.85.158.146; }; }; -zone "mageia.fr" IN { +<% +for tld in managed_tlds +%> + +zone "mageia.<%= tld %>" IN { type master; - file "master/mageia.fr"; + file "master/mageia.<= tld %>"; allow-update { 212.85.158.146; }; }; +<% +end +%> + zone "7.0.0.0.2.0.0.0.8.7.1.2.2.0.a.2.ip6.arpa" IN { type slave; file "slave/7.0.0.0.2.0.0.0.8.7.1.2.2.0.a.2.ip6.arpa.zone"; |