rsync on lw0[1234]
authorPeter Palfrader <peter@palfrader.org>
Fri, 28 Aug 2015 11:39:35 +0000 (13:39 +0200)
committerPeter Palfrader <peter@palfrader.org>
Fri, 28 Aug 2015 11:39:35 +0000 (13:39 +0200)
modules/roles/manifests/init.pp
modules/roles/manifests/snapshot.pp [new file with mode: 0644]
modules/roles/templates/snapshot/rsyncd.conf.erb [new file with mode: 0644]

index a40571d..c0b46e2 100644 (file)
@@ -262,4 +262,8 @@ class roles {
        if has_role('dgit_git') {
                include dgit_git
        }
+
+       if $::hostname in [lw01, lw02, lw03, lw04] {
+               include snapshot
+       }
 }
diff --git a/modules/roles/manifests/snapshot.pp b/modules/roles/manifests/snapshot.pp
new file mode 100644 (file)
index 0000000..b432f4f
--- /dev/null
@@ -0,0 +1,5 @@
+class roles::snapshot {
+       rsync::site { 'snapshot-farm':
+               content => template('roles/snapshot/rsync.conf.erb'),
+       }
+}
diff --git a/modules/roles/templates/snapshot/rsyncd.conf.erb b/modules/roles/templates/snapshot/rsyncd.conf.erb
new file mode 100644 (file)
index 0000000..4f809f6
--- /dev/null
@@ -0,0 +1,24 @@
+uid = nobody
+gid = nogroup
+max connections = 20
+syslog facility = daemon
+socket options = SO_KEEPALIVE
+timeout = 7200
+log file = /var/log/rsyncd/rsyncd.log
+
+[snapshot-farm-1]
+  path = /storage/snapshot-farm-1
+  read only = true
+  list = false
+[snapshot-farm-2]
+  path = /storage/snapshot-farm-2
+  read only = true
+  list = false
+[snapshot-farm-3]
+  path = /storage/snapshot-farm-3
+  read only = true
+  list = false
+[snapshot-farm-4]
+  path = /storage/snapshot-farm-4
+  read only = true
+  list = false