From e8cc4e5ea21d4f9204b72ef831257556b81203f1 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 21 Dec 2015 20:21:18 +0100 Subject: [PATCH] make syncproxy rsync.conf a template --- modules/roles/manifests/syncproxy.pp | 2 +- .../syncproxy/rsyncd.conf.erb} | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) rename modules/roles/{files/syncproxy/rsyncd.conf => templates/syncproxy/rsyncd.conf.erb} (68%) 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/files/syncproxy/rsyncd.conf b/modules/roles/templates/syncproxy/rsyncd.conf.erb similarity index 68% rename from modules/roles/files/syncproxy/rsyncd.conf rename to modules/roles/templates/syncproxy/rsyncd.conf.erb index 387a4e1ee..832ad9e83 100644 --- a/modules/roles/files/syncproxy/rsyncd.conf +++ b/modules/roles/templates/syncproxy/rsyncd.conf.erb @@ -10,6 +10,9 @@ 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 @@ -17,20 +20,28 @@ log file = /var/log/rsyncd/rsyncd.log [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 - list = no [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 = * -- 2.20.1