X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Ftemplates%2Fsyncproxy%2Frsyncd.conf.erb;h=a33d36da94747b055b007b17390a64e9ce4cdd3d;hb=9906f830944ef1a8ba69a65565e4a0f7eadbd965;hp=dd348e43faf7adbdf9e0ac9066bd6a5ac6eba07b;hpb=810511398d02d8b7ebeafcbe6dcd6cdd86add92e;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/templates/syncproxy/rsyncd.conf.erb b/modules/roles/templates/syncproxy/rsyncd.conf.erb index dd348e43f..a33d36da9 100644 --- a/modules/roles/templates/syncproxy/rsyncd.conf.erb +++ b/modules/roles/templates/syncproxy/rsyncd.conf.erb @@ -1,40 +1,58 @@ uid = nobody gid = nogroup -max connections = 30 syslog facility = daemon socket options = SO_KEEPALIVE +reverse lookup = false timeout = 7200 # weasel 2007-11-19 log file = /var/log/rsyncd/rsyncd-syncproxy.log -[debian] - path = /srv/mirrors/debian/ -<%- unless has_variable?("has_srv_mirrors_debian") && has_srv_mirrors_debian == "true" -%> - list = no -<%- end -%> - comment = Full Debian FTP Archive (contact mirrors@debian.org for access; see https://www.debian.org/mirror/size for size) - auth users = * - read only = true - secrets file = /etc/rsyncd/debian.secrets +read only = true +ignore nonreadable = true +strict modes = false -[debian-debug] - path = /srv/mirrors/debian-debug/ -<%- unless has_variable?("has_srv_mirrors_debian_debug") && has_srv_mirrors_debian_debug == "true" -%> - list = no -<%- end -%> - comment = Debug packages. Probably large. Starting end of 2015. - auth users = * - read only = true - secrets file = /etc/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', + list: false, + }, + { name: 'debian-security-buildd-pool', + list: false, + }, + { name: 'debian-buildd', + list: false, + }, + ] -[debian-security] - path = /srv/mirrors/debian-security/ -<%- unless has_variable?("has_srv_mirrors_debian_security") && has_srv_mirrors_debian_security == "true" -%> - list = no -<%- end -%> - comment = Debian security archive (~100 GB; contact mirrors@debian.org for access) - auth users = * - read only = true - secrets file = /etc/rsyncd/debian.secrets + lines = [] + repositories.each do |repo| + varname = ('has' + @mirror_basedir_prefix + repo[:name]).gsub(/[\/-]/,'_') + next unless has_variable?(varname) and (eval("@"+varname)) + + 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 + + lines.join("\n") +%>