Andrew Bogott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/71125


Change subject: Convert the udp2log rsyncd to use the rsyncd module.
......................................................................

Convert the udp2log rsyncd to use the rsyncd module.

Change-Id: I0aefd8f1b174e3c02a1bf0fba49ff2156ac1db40
---
M manifests/misc/udp2log.pp
D templates/udp2log/rsyncd.conf.erb
2 files changed, 11 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/25/71125/1

diff --git a/manifests/misc/udp2log.pp b/manifests/misc/udp2log.pp
index c0f552c..8ee0999 100644
--- a/manifests/misc/udp2log.pp
+++ b/manifests/misc/udp2log.pp
@@ -61,30 +61,24 @@
 # and analytics servers to copy logs off of a
 # udp2log host.
 #
-# NOTE: I would much rather have generic::rsyncd to be a
-# more generic define, and allow for configuration of multiple
-# rsync modules from different places.  This would allow for
-# the misc::udp2log::instance to set up rsync-ability.  This
-# will do for now :\
-#
-# TODO: Allow allow_hosts to be an array.
-#
 # Parameters:
 #   $path        - path to udp2log logrotated archive directory
 #   $allow_hosts - IP address of host from which to allow rsync
 #
 class misc::udp2log::rsyncd(
-       $path = "/var/log/udp2log/archive",
-       $hosts_allow = "208.80.152.146 10.64.0.16") {
-
-       # Set up an rsync daemon module for $path.
-       # This allows stat1 to copy logs from the
-       # logrotated archive directory
-       class { "generic::rsyncd":
-               content => template("udp2log/rsyncd.conf.erb"),
-       }
+                                               $path = 
"/var/log/udp2log/archive",
+                                               $hosts_allow = 
['208.80.152.146', '10.64.0.16']) {
+       include rsync::server
+       rsync::server::module {
+               'udp2log':
+                       comment => 'udp2log log files',
+                       path        => $path,
+                       read_only   => 'true',
+                       hosts_allow => $hosts_allow;
+    }
 }
 
+
 # Define: misc::udp2log::instance
 #
 # Sets up a udp2log daemon instance.
diff --git a/templates/udp2log/rsyncd.conf.erb 
b/templates/udp2log/rsyncd.conf.erb
deleted file mode 100644
index 21e4f8b..0000000
--- a/templates/udp2log/rsyncd.conf.erb
+++ /dev/null
@@ -1,9 +0,0 @@
-# This file is managed by Puppet
-
-# udp2log log directory readonly rsync module
-[udp2log]
-comment = "udp2log log files"
-path = <%= path %>
-read only = true
-# only allow stat1
-hosts allow = <%= hosts_allow.class == Array ? hosts_allow.join(' ') : 
hosts_allow %>

-- 
To view, visit https://gerrit.wikimedia.org/r/71125
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0aefd8f1b174e3c02a1bf0fba49ff2156ac1db40
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to