From: Peter Palfrader Date: Fri, 28 Aug 2015 11:39:35 +0000 (+0200) Subject: rsync on lw0[1234] X-Git-Url: https://git.donarmstrong.com/?p=dsa-puppet.git;a=commitdiff_plain;h=deeab74647d436893c5bf0833e8f2314643d7c17 rsync on lw0[1234] --- diff --git a/modules/roles/manifests/init.pp b/modules/roles/manifests/init.pp index a40571d7..c0b46e2d 100644 --- a/modules/roles/manifests/init.pp +++ b/modules/roles/manifests/init.pp @@ -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 index 00000000..b432f4f1 --- /dev/null +++ b/modules/roles/manifests/snapshot.pp @@ -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 index 00000000..4f809f6e --- /dev/null +++ b/modules/roles/templates/snapshot/rsyncd.conf.erb @@ -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