aboutsummaryrefslogtreecommitdiffstats
path: root/modules/rsyncd
diff options
context:
space:
mode:
Diffstat (limited to 'modules/rsyncd')
-rw-r--r--modules/rsyncd/manifests/init.pp34
-rw-r--r--modules/rsyncd/templates/rsyncd.conf12
-rw-r--r--modules/rsyncd/templates/xinetd5
3 files changed, 13 insertions, 38 deletions
diff --git a/modules/rsyncd/manifests/init.pp b/modules/rsyncd/manifests/init.pp
index 148cc426..5cc9e2fd 100644
--- a/modules/rsyncd/manifests/init.pp
+++ b/modules/rsyncd/manifests/init.pp
@@ -1,32 +1,12 @@
-class rsyncd {
+class rsyncd($rsyncd_conf = 'rsyncd/rsyncd.conf') {
- package { xinetd:
- ensure => installed
+ xinetd::service { 'rsync':
+ content => template('rsyncd/xinetd')
}
- service { xinetd:
- ensure => running,
- path => "/etc/init.d/xinetd",
- subscribe => [ Package["xinetd"], File["rsync"] ]
- }
-
- file { "rsync":
- path => "/etc/xinetd.d/rsync",
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
- require => Package["xinetd"],
- content => template("rsyncd/xinetd")
- }
-
- file { "rsyncd.conf":
- path => "/etc/rsyncd.conf",
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
- require => Package["rsync"],
- content => template("rsyncd/rsyncd.conf")
+ file { 'rsyncd.conf':
+ path => '/etc/rsyncd.conf',
+ require => Package['rsync'],
+ content => template($rsyncd_conf)
}
}
diff --git a/modules/rsyncd/templates/rsyncd.conf b/modules/rsyncd/templates/rsyncd.conf
index e5cfa6d2..11dbc6a4 100644
--- a/modules/rsyncd/templates/rsyncd.conf
+++ b/modules/rsyncd/templates/rsyncd.conf
@@ -1,15 +1,7 @@
# $Id$
uid = nobody
-gid = nogroup
+gid = nogroup
-[mageia]
- path = /distrib/mirror/
- comment = Mageia Mirror Tree
- hosts allow = \
- distrib-coffee.ipsl.jussieu.fr \
- distribipsl.aero.jussieu.fr \
- ibiblio.org \
- 152.46.7.122 \
- 152.19.134.16 \
+# default empty rsyncd.conf
diff --git a/modules/rsyncd/templates/xinetd b/modules/rsyncd/templates/xinetd
index 46a3fd33..b477e413 100644
--- a/modules/rsyncd/templates/xinetd
+++ b/modules/rsyncd/templates/xinetd
@@ -1,4 +1,3 @@
-# $Id: xinetd 319 2009-02-28 17:05:16Z guillomovitch $
service rsync
{
disable = no
@@ -8,5 +7,9 @@ service rsync
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
+ flags = IPv6
+ # some mirrors do not seems to use locks when downloading from
+ # us and try to download the same stuff 15 times in a row
+ per_source = 4
}