From: Peter Palfrader Date: Mon, 21 Dec 2015 19:21:18 +0000 (+0100) Subject: make syncproxy rsync.conf a template X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=e8cc4e5ea21d4f9204b72ef831257556b81203f1;p=mirror%2Fdsa-puppet.git make syncproxy rsync.conf a template --- diff --git a/modules/roles/files/syncproxy/rsyncd.conf b/modules/roles/files/syncproxy/rsyncd.conf deleted file mode 100644 index 387a4e1ee..000000000 --- a/modules/roles/files/syncproxy/rsyncd.conf +++ /dev/null @@ -1,39 +0,0 @@ -uid = nobody -gid = nogroup -max connections = 30 -syslog facility = daemon -socket options = SO_KEEPALIVE -timeout = 7200 - -# weasel 2007-11-19 -log file = /var/log/rsyncd/rsyncd.log - -[debian] - path = /srv/mirrors/debian/ - comment = Full Debian FTP Archive (~1.5 TB as of 2015; contact mirrors@debian.org for access) - auth users = * - read only = true - secrets file = /etc/rsyncd/debian.secrets - -[debian-backports] - path = /srv/mirrors/debian-backports/ - comment = Debian backports archive (up to, including Debian 6.0(squeeze) - ~35 GB; contact mirrors@debian.org for access) - auth users = * - read only = true - secrets file = /etc/rsyncd/debian.secrets - -[debian-debug] - path = /srv/mirrors/debian-debug/ - comment = Debug packages. Probably large. Starting end of 2015. - auth users = * - read only = true - secrets file = /etc/rsyncd/debian.secrets - list = no - -[debian-security] - path = /srv/mirrors/debian-security/ - comment = Debian security archive (~100 GB; contact mirrors@debian.org for access) - auth users = * - read only = true - secrets file = /etc/rsyncd/debian.secrets - diff --git a/modules/roles/manifests/syncproxy.pp b/modules/roles/manifests/syncproxy.pp index 087c13a0b..c618bcccf 100644 --- a/modules/roles/manifests/syncproxy.pp +++ b/modules/roles/manifests/syncproxy.pp @@ -1,6 +1,6 @@ class roles::syncproxy { rsync::site { 'syncproxy': - source => 'puppet:///modules/roles/syncproxy/rsyncd.conf', + content => template('roles/syncproxy/rsyncd.conf.erb', bind => $::hostname ? { 'milanollo' => '5.153.231.9', 'mirror-isc' => '149.20.20.21', diff --git a/modules/roles/templates/syncproxy/rsyncd.conf.erb b/modules/roles/templates/syncproxy/rsyncd.conf.erb new file mode 100644 index 000000000..832ad9e83 --- /dev/null +++ b/modules/roles/templates/syncproxy/rsyncd.conf.erb @@ -0,0 +1,50 @@ +uid = nobody +gid = nogroup +max connections = 30 +syslog facility = daemon +socket options = SO_KEEPALIVE +timeout = 7200 + +# weasel 2007-11-19 +log file = /var/log/rsyncd/rsyncd.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 (~1.5 TB as of 2015; contact mirrors@debian.org for access) + auth users = * + read only = true + secrets file = /etc/rsyncd/debian.secrets + +[debian-backports] + path = /srv/mirrors/debian-backports/ +<%- unless has_variable?("has_srv_mirrors_debian_backports") && has_srv_mirrors_debian_backports == "true" -%> + list = no +<%- end -%> + comment = Debian backports archive (up to, including Debian 6.0(squeeze) - ~35 GB; contact mirrors@debian.org for access) + auth users = * + read only = true + secrets file = /etc/rsyncd/debian.secrets + +[debian-debug] +<%- unless has_variable?("has_srv_mirrors_debian_debug") && has_srv_mirrors_debian_debug == "true" -%> + list = no +<%- end -%> + path = /srv/mirrors/debian-debug/ + comment = Debug packages. Probably large. Starting end of 2015. + auth users = * + read only = true + secrets file = /etc/rsyncd/debian.secrets + +[debian-security] +<%- unless has_variable?("has_srv_mirrors_debian_security") && has_srv_mirrors_debian_security == "true" -%> + list = no +<%- end -%> + path = /srv/mirrors/debian-security/ + comment = Debian security archive (~100 GB; contact mirrors@debian.org for access) + auth users = * + read only = true + secrets file = /etc/rsyncd/debian.secrets +