]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Support adding dns snippets on orff from other hosts
authorPeter Palfrader <peter@palfrader.org>
Fri, 7 Jun 2013 18:58:30 +0000 (18:58 +0000)
committerPeter Palfrader <peter@palfrader.org>
Fri, 7 Jun 2013 18:58:30 +0000 (18:58 +0000)
manifests/site.pp
modules/dnsextras/manifests/entries.pp [new file with mode: 0644]
modules/dnsextras/manifests/entry.pp [new file with mode: 0644]
modules/exim/manifests/init.pp
modules/exim/manifests/mx.pp

index 8e4a77ac332759f66c66d6608d4892c68c1a3a1b..ace4f63b3a37b8a98733a6b43de1d17915c276ff 100644 (file)
@@ -91,6 +91,9 @@ node default {
        } elsif $::hostname in [geo1,geo2,geo3] {
                include named::geodns
        }
+       if $::hostname in [orff] {
+               include dnsextras::entries
+       }
 
        if $::hostname in [diabelli,nono,spohr] {
                include dacs
diff --git a/modules/dnsextras/manifests/entries.pp b/modules/dnsextras/manifests/entries.pp
new file mode 100644 (file)
index 0000000..0dbf7de
--- /dev/null
@@ -0,0 +1,13 @@
+class dnsextras::entries {
+       file { '/srv/dns.debian.org/puppet-extra':
+               ensure => 'directory',
+       }
+
+       concat { '/srv/dns.debian.org/puppet-extra/include-debian.org':
+               #require => Package['exim4-daemon-heavy']
+               # notify  => Service["nagios"],
+       }
+
+
+       Concat::Fragment <<| tag == "dnsextra" |>>
+}
diff --git a/modules/dnsextras/manifests/entry.pp b/modules/dnsextras/manifests/entry.pp
new file mode 100644 (file)
index 0000000..9c2b6b9
--- /dev/null
@@ -0,0 +1,12 @@
+define dnsextras::entry (
+       $zone,
+       $label,
+       $rrtype,
+       $rrdata,
+) {
+       @@concat::fragment { "dns-extra-${zone}-${::fqdn}-${name}":
+               target  => "/srv/dns.debian.org/puppet-extra/include-${zone}",
+               content => "; ${::fqdn} ${name}\n${label}. IN ${rrtype} ${rrdata}\n",
+               tag => 'dnsextra',
+       }
+}
index 096100da55dc6ecb59703215510ca850b66d6490..1fb18d6f985f410c057d286b90f6788b2373737e 100644 (file)
@@ -133,7 +133,7 @@ class exim {
 
        case getfromhash($site::nodeinfo, 'mail_port') {
                /^(\d+)$/: { $mail_port = $1 }
-               default: { $mail_port = 'smtp' }
+               default: { $mail_port = '25' }
        }
 
        @ferm::rule { 'dsa-exim':
@@ -146,6 +146,11 @@ class exim {
                domain      => 'ip6',
                rule        => "&SERVICE_RANGE(tcp, $mail_port, \$SMTP_V6_SOURCES)"
        }
+       dnsextras::entry{ "tlsa-mailport":
+               zone => 'debian.org',
+               label => "_${mail_port}._tcp.${::fqdn}",
+               rrtype => 'TXT',
+               rrdata => 'testing' }
 
        # Do we actually want this?  I'm only doing it because it's harmless
        # and makes the logs quiet.  There are better ways of making logs quiet,
index 80ed36f7e72c9b0d875733f0a0d6b374bba54e5c..3c40623d64826184ac0dfc7c0b6bc577464e137a 100644 (file)
@@ -13,6 +13,7 @@ class exim::mx inherits exim {
                notify  => Service['exim4'],
        }
 
+       # MXs used as smarthosts
        @ferm::rule { 'dsa-exim-submission':
                description => 'Allow SMTP',
                rule        => '&SERVICE_RANGE(tcp, submission, $SMTP_SOURCES)'
@@ -22,6 +23,11 @@ class exim::mx inherits exim {
                domain      => 'ip6',
                rule        => '&SERVICE_RANGE(tcp, submission, $SMTP_V6_SOURCES)',
        }
+       dnsextras::entry{ "tlsa-submission":
+               zone => 'debian.org',
+               label => "_587._tcp.${::fqdn}",
+               rrtype => 'TXT',
+               rrdata => 'testing' }
 
        package { 'nagios-plugins-standard':
                ensure => installed,