# all of these should be retired in favour of including the class role
# with the host. weasel, 2019-09
roles:
- dns_primary:
- # XXX - used by ferm templates/defs.conf.erb
- - denis.debian.org
extranrpeclient:
# XXX - used by ferm templates/defs.conf.erb
- denis.debian.org
--- /dev/null
+---
+classes:
+ - roles::dns_primary
allnodeinfo = scope.lookupvar('deprecated::allnodeinfo')
roles = scope.lookupvar('deprecated::roles')
- %w{mailrelay nagiosmaster extranrpeclient muninmaster postgres_backup_server syncproxy security_master ftp_master historical_master ports_master mirrormaster dns_primary}.each do |role|
+ %w{mailrelay nagiosmaster extranrpeclient muninmaster postgres_backup_server syncproxy security_master ftp_master historical_master ports_master mirrormaster}.each do |role|
rolehost[role] = []
roles[role].each do |node|
next unless allnodeinfo.has_key?(node) and allnodeinfo[node].has_key?('ipHostNumber')
@def $HOST_SYNCPROXY_V4 = ($HOST_SYNCPROXY_V4 128.101.240.216 128.31.0.64 149.20.4.16 209.87.16.40);
@def $HOST_SYNCPROXY_V6 = ($HOST_SYNCPROXY_V6 2607:ea00:101:3c0b::1deb:216 2603:400a:ffff:bb8::801f:40 2001:4f8:1:c::16 2607:f8f0:614:1::1274:40);
-@def $HOST_DNSPRIMARY_V4 = (<%= scope.function_filter_ipv4([rolehost['dns_primary']]).uniq.join(' ') %>);
-@def $HOST_DNSPRIMARY_V6 = (<%= scope.function_filter_ipv6([rolehost['dns_primary']]).uniq.join(' ') %>);
-@def $HOST_DNSPRIMARY = ($HOST_DNSPRIMARY_V4 $HOST_DNSPRIMARY_V6);
<%
def getfastlyranges()
| EOF
}
- # The nagios server wants to do DNS queries on the primary
+ # The nagios server wants to do DNS queries on the primaries
@@ferm::rule::simple { "dsa-bind-from-${::fqdn}":
- tag => 'named::primary::ferm',
+ tag => [
+ 'named::primary::ferm',
+ 'named::keyring::ferm',
+ ],
description => 'Allow nagios master access to the primary for checks',
proto => ['udp', 'tcp'],
port => 'domain',
};
| EOF
}
+ @@ferm::rule::simple { "dsa-bind-from-${::fqdn}":
+ tag => 'named::keyring::ferm',
+ description => 'Allow primary access to the keyring master',
+ proto => ['udp', 'tcp'],
+ port => 'domain',
+ saddr => $base::public_addresses,
+ }
concat::fragment { 'puppet-crontab--nsec3':
target => '/etc/cron.d/puppet-crontab',
include roles::syncproxy
}
- if has_role('dns_primary') {
- include roles::dns_primary
- }
-
if has_role('postgres_backup_server') {
include postgres::backup_server
}
$notify_address_bind = join(getfromhash($deprecated::allnodeinfo, 'denis.debian.org', 'ipHostNumber'), '; ')
- ferm::rule { '01-dsa-bind':
- domain => '(ip ip6)',
- description => 'Allow nameserver access',
- rule => '&TCP_UDP_SERVICE_RANGE(53, ( $HOST_NAGIOS $HOST_DNSPRIMARY ) )',
- }
+ Ferm::Rule::Simple <<| tag == 'named::keyring::ferm' |>>
concat::fragment { 'dsa-named-conf-puppet-misc---openpgpkey-zone':
target => '/etc/bind/named.conf.puppet-misc',