aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--manifests/nodes.pp1
-rw-r--r--modules/rsyncd/manifests/init.pp35
-rw-r--r--modules/rsyncd/templates/rsyncd.conf12
-rw-r--r--modules/rsyncd/templates/xinetd12
4 files changed, 60 insertions, 0 deletions
diff --git a/manifests/nodes.pp b/manifests/nodes.pp
index d4c34376..668c0829 100644
--- a/manifests/nodes.pp
+++ b/manifests/nodes.pp
@@ -1,6 +1,7 @@
# svn, big important server
node valstar {
include default_mageia_server
+ include rsyncd
timezone { "Europe/Paris": }
# for puppet svn checkout
diff --git a/modules/rsyncd/manifests/init.pp b/modules/rsyncd/manifests/init.pp
new file mode 100644
index 00000000..13bdc277
--- /dev/null
+++ b/modules/rsyncd/manifests/init.pp
@@ -0,0 +1,35 @@
+class rsyncd {
+
+ package { rsync:
+ ensure => installed
+ }
+ package { xinetd:
+ ensure => installed
+ }
+
+ service { xinetd:
+ ensure => running,
+ path => "/etc/init.d/xinetd",
+ subscribe => [ Package["xinetd"], File["xinetd"] ]
+ }
+
+ file { "rsync"
+ path => "/etc/xinetd.d/rsync",
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 644,
+ require => "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")
+ }
+}
diff --git a/modules/rsyncd/templates/rsyncd.conf b/modules/rsyncd/templates/rsyncd.conf
new file mode 100644
index 00000000..c1177d52
--- /dev/null
+++ b/modules/rsyncd/templates/rsyncd.conf
@@ -0,0 +1,12 @@
+# $Id$
+
+uid = nobody
+gid = nogroup
+
+[mageia]
+ path = /distrib/mirror/
+ comment = Mageia Mirror Tree
+ hosts allow = \
+ distrib-coffee.ipsl.jussieu.fr \
+ distribipsl.aero.jussieu.fr \
+ ibiblio.org \
diff --git a/modules/rsyncd/templates/xinetd b/modules/rsyncd/templates/xinetd
new file mode 100644
index 00000000..46a3fd33
--- /dev/null
+++ b/modules/rsyncd/templates/xinetd
@@ -0,0 +1,12 @@
+# $Id: xinetd 319 2009-02-28 17:05:16Z guillomovitch $
+service rsync
+{
+ disable = no
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/bin/rsync
+ server_args = --daemon
+ log_on_failure += USERID
+}
+