searchpaths: []
resolvoptions: []
allow_dns_query: []
+role_config:
+ syncproxy:
+ mirror_basedir_prefix: '/srv/mirrors/'
roles:
bugsmx:
- buxtehude.debian.org
- klecker.debian.org
- milanollo.debian.org
- mirror-anu.debian.org
+ - mirror-conova.debian.org
- mirror-isc.debian.org
- mirror-umn.debian.org
tracker:
--- /dev/null
+role_config:
+ syncproxy:
+ mirror_basedir_prefix: '/srv/mirrors/syncproxy-'
/srv/mirrors/debian-debug
/srv/mirrors/debian-ports
/srv/mirrors/debian-security
+ /srv/mirrors/syncproxy-debian
+ /srv/mirrors/syncproxy-debian-debug
+ /srv/mirrors/syncproxy-debian-ports
+ /srv/mirrors/syncproxy-debian-security
/dev/hwrng
}.each do |path|
Facter.add("has" + path.gsub(/[\/-]/,'_')) do
---
:hierarchy:
+ - 'nodes/%{trusted.certname}'
- '%{hoster}'
- 'clusters/%{cluster}'
- 'common'
class roles::syncproxy {
include roles::archvsync_base
+ $mirror_basedir_prefix = hiera('role_config.syncproxy.mirror_basedir_prefix')
+
$binds = $::hostname ? {
'milanollo' => [ '5.153.231.9', '[2001:41c8:1000:21::21:9]' ],
'mirror-anu' => [ '150.203.164.60', '[2001:388:1034:2900::3c]' ],
+ 'mirror-conova' => [ '217.196.149.237', '[2a02:16a8:dc41:100::237]' ],
'mirror-isc' => [ '149.20.4.16', '[2001:4f8:1:c::16]' ],
'mirror-umn' => [ '128.101.240.216', '[2607:ea00:101:3c0b::1deb:216]' ],
'klecker' => [ '130.89.148.10', '[2001:610:1908:b000::148:10]',
$syncproxy_name = $::hostname ? {
'milanollo' => 'syncproxy3.eu.debian.org',
'mirror-anu' => 'syncproxy.au.debian.org',
+ 'mirror-conova' => 'syncproxy4.eu.debian.org',
'mirror-isc' => 'syncproxy2.wna.debian.org',
'mirror-umn' => 'syncproxy.cna.debian.org',
'klecker' => 'syncproxy2.eu.debian.org',
ignore nonreadable = true
strict modes = false
-[debian]
- path = /srv/mirrors/debian/
-<%- unless has_variable?("has_srv_mirrors_debian") && @has_srv_mirrors_debian -%>
- list = no
-<%- end -%>
- comment = Debian archive (contact mirrors@debian.org for access; see https://www.debian.org/mirror/size for size)
- auth users = *
- secrets file = /home/archvsync/rsyncd/debian.secrets
+<%=
+ repositories = [
+ { name: 'debian',
+ comment: 'Debian archive (contact mirrors@debian.org for access; see https://www.debian.org/mirror/size for size)'
+ },
+ { name: 'debian-debug',
+ comment: 'Debug packages for Debian archive (contact mirrors@debian.org for access)'
+ },
+ { name: 'debian-ports',
+ comment: 'Debian ports archive (contact mirrors@debian.org for access)'
+ },
+ { name: 'debian-security',
+ comment: 'Debian security archive'
+ },
+ { name: 'debian-security-buildd-pool',
+ list: false
+ },
+ ]
-[debian-debug]
- path = /srv/mirrors/debian-debug/
-<%- unless has_variable?("has_srv_mirrors_debian_debug") && @has_srv_mirrors_debian_debug -%>
- list = no
-<%- end -%>
- comment = Debug packages for Debian archive (contact mirrors@debian.org for access)
- auth users = *
- secrets file = /home/archvsync/rsyncd/debian-debug.secrets
+ lines = []
-[debian-ports]
- path = /srv/mirrors/debian-ports/
-<%- unless has_variable?("has_srv_mirrors_debian_debug") && @has_srv_mirrors_debian_debug -%>
- list = no
-<%- end -%>
- comment = Debian ports archive (contact mirrors@debian.org for access)
- auth users = *
- secrets file = /home/archvsync/rsyncd/debian-ports.secrets
+ repositories.each do |repo|
+ varname = ('has' + @mirror_basedir_prefix + repo[:name]).gsub(/[\/-]/,'_')
+ next unless has_variable?(varname) and (eval("@"+varname))
-[debian-security]
- path = /srv/mirrors/debian-security/
-<%- unless has_variable?("has_srv_mirrors_debian_security") && @has_srv_mirrors_debian_security -%>
- list = no
-<%- end -%>
- comment = Debian security archive (contact mirrors@debian.org for access)
- auth users = *
- secrets file = /home/archvsync/rsyncd/debian-security.secrets
+ lines << "[#{ repo[:name] }]"
+ lines << " path = #{ @mirror_basedir_prefix }#{ repo[:name] }/"
+ if (repo.include?(:list) and not repo[:list])
+ lines << " list = no"
+ end
+ if repo.include?(:comment)
+ lines << " comment = #{ repo[:comment] }"
+ end
+ lines << " auth users = *"
+ lines << " secrets file = /home/archvsync/rsyncd/#{ repo[:name] }.secrets"
+ lines << ""
+ end
-[debian-security-buildd-pool]
- path = /srv/mirrors/debian-security-buildd/pool/
- list = no
- auth users = *
- secrets file = /home/archvsync/rsyncd/debian-security-buildd-pool.secrets
+ lines.join("\n")
+%>
<%=
lines = []
%w{debian debian-debug debian-ports debian-security}.each do |archive|
- varname = 'has_srv_mirrors_' + archive.gsub(/[\/-]/,'_')
+ varname = ('has' + @mirror_basedir_prefix + archive).gsub(/[\/-]/,'_')
if has_variable?(varname) and (eval("@"+varname))
- lines << " Alias /#{archive}/project/trace/ /srv/mirrors/#{archive}/project/trace/"
- lines << " <Directory /srv/mirrors/#{archive}/project/trace/>"
+ lines << " Alias /#{archive}/project/trace/ #{@mirror_basedir_prefix}#{archive}/project/trace/"
+ lines << " <Directory #{@mirror_basedir_prefix}#{archive}/project/trace/>"
lines << " Require all granted"
lines << " Options +Indexes"
lines << " </Directory>"
<%=
lines = []
%w{debian debian-debug debian-ports debian-security}.each do |archive|
- varname = 'has_srv_mirrors_' + archive.gsub(/[\/-]/,'_')
+ varname = ('has' + @mirror_basedir_prefix + archive).gsub(/[\/-]/,'_')
if has_variable?(varname) and (eval("@"+varname))
lines << "<li>#{archive} [<a href=\"/#{archive}/project/trace/\">trace directory</a>]</li>"
end