[PATCH 1/2] templatize rsyncd.conf for master mirrors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From 77af1729ab406762cc2c66c8ca7b6043578f0ae9 Mon Sep 17 00:00:00 2001
From: Matt Domsch <mdomsch@xxxxxxxxxxxxxxxxx>
Date: Wed, 6 Jul 2011 15:52:27 +0000
Subject: [PATCH 1/2] templatize master mirror rsyncd.conf files

---
 manifests/services/download-server.pp              |    2 +-
 modules/rsync/manifests/mastermirror.pp            |   10 +++
 .../rsync/templates/rsyncd.conf.mastermirror.erb   |   83 ++++++++++++++++++++
 3 files changed, 94 insertions(+), 1 deletions(-)
 create mode 100644 modules/rsync/manifests/mastermirror.pp
 create mode 100644 modules/rsync/templates/rsyncd.conf.mastermirror.erb

diff --git a/manifests/services/download-server.pp b/manifests/services/download-server.pp
index 9364398..1d994f7 100644
--- a/manifests/services/download-server.pp
+++ b/manifests/services/download-server.pp
@@ -9,7 +9,7 @@ class download-server::base {
   include http_log
   include httpd::proxy
   include mod_limitipconn::mod_limitipconn
-  include rsync::server
+  include rsync::mastermirror
   include nfs-utils::package
 
   collectd::collectd { 'log02': }
diff --git a/modules/rsync/manifests/mastermirror.pp b/modules/rsync/manifests/mastermirror.pp
new file mode 100644
index 0000000..1f1e0da
--- /dev/null
+++ b/modules/rsync/manifests/mastermirror.pp
@@ -0,0 +1,10 @@
+class rsync::mastermirror inherits rsync::server {
+    $hosts_allow = "152.46.7.122 200.17.202.1/28 zeus1.kernel.org zeus2.kernel.org zeus3.kernel.org zeus4.kernel.org 149.20.20.132 204.152.191.36 199.6.1.170 130.239.17.3 sinclair.wpi.edu bonaparte.hrz.tu-chemnitz.de josephine.hrz.tu-che mirror.speedpartner.de rsyncer.ftp.heanet.ie archive.linux.duke.edu lists.us.dell.com auslistsprd01.us.dell.com auslistsdr01.us.dell.com 65.18.175.19 198.129.224.34 mirror.hiwaay.net sagres.c3sl.ufpr.br mail.fedoraunity.org scrye.com odysseus.fi.muni.cz rhlx01.hs-esslingen.de"
+  
+    file { "/etc/rsyncd.conf":
+        content => template("puppet:///rsync/rsyncd.conf.mastermirror.erb"),
+        mode    => 0644,
+        require => Package["rsync"],
+    }
+}
+
diff --git a/modules/rsync/templates/rsyncd.conf.mastermirror.erb b/modules/rsync/templates/rsyncd.conf.mastermirror.erb
new file mode 100644
index 0000000..d55256d
--- /dev/null
+++ b/modules/rsync/templates/rsyncd.conf.mastermirror.erb
@@ -0,0 +1,83 @@
+pid file = /var/run/rsyncd.pid
+syslog facility = daemon
+max connections = 25
+timeout = 600
+use chroot = yes
+uid = nobody
+gid = nobody
+#transfer logging = false
+motd file = /etc/motd_fedora
+log file = /var/log/rsyncd-fedora.log
+
+dont compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.bz2 *.iso *.ogg *.ogv *.tbz
+exclude = .snapshot/ .~tmp~/ /.private/ /.private/** **/.nfs*
+ignore nonreadable = yes
+list = true
+read only = yes
+refuse options = checksum
+
+[ fedora-alt ]
+        comment = non-Fedora Alternative Content
+        path = /srv/pub/alt
+
+[fedora-archive]
+        comment = Fedora Release Archives
+        path = /srv/pub/archive
+     
+[ fedora-enchilada ]
+        comment = Fedora - The whole enchilada
+        path = /srv/pub/fedora
+
+[ fedora-epel ]
+        comment = Extra Packages for Enterprise Linux
+        path = /srv/pub/epel
+
+[ fedora-linux-releases ]
+        comment = Fedora Linux Releases
+        path = /srv/pub/fedora/linux/releases
+
+[ fedora-linux-development ]
+        comment = Fedora Linux Development
+        path = /srv/pub/fedora/linux/development
+
+[ fedora-linux-updates ]
+        comment = Fedora Linux Updates
+        path = /srv/pub/fedora/linux/updates
+
+[fedora-secondary]
+        comment = Fedora Secondary Archs
+        path = /srv/pub/fedora-secondary
+
+[ fedora-stage ]
+        comment = Staging directory
+	path = /srv/pub/alt/stage/
+
+##
+## The following are not seen and are limited by IP.
+##
+
+[fedora-enchilada0]
+       comment = Fedora Enchilada for Tier0|1 Mirrors
+       path = /srv/pub/fedora/
+       list = no
+       uid = 263
+       gid = 263
+       hosts allow = <%= hosts_allow %>
+
+[fedora-epel0]
+       comment = Fedora EPEL for Tier0|1 Mirrors
+       path = /srv/pub/epel/
+       list = no
+       uid = 263
+       gid = 263
+       hosts allow = <%= hosts_allow %>
+
+# For distributing applications
+[log]
+       comment = Server Logs
+       path = /var/log
+       uid = root
+       gid = root
+       read only = yes
+       hosts allow = 10.5.126.29
+       list = no
-- 
1.7.2.1


-- 
Matt Domsch
Technology Strategist
Dell | Office of the CTO
_______________________________________________
infrastructure mailing list
infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/infrastructure


[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux