Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/adblockplus/manifests/host/statsmaster.pp

Issue 29367240: Issue 3638 - Generate statsmaster filter mirror configuration with concat (Closed)
Patch Set: Created Dec. 12, 2016, 10 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: modules/adblockplus/manifests/host/statsmaster.pp
===================================================================
--- a/modules/adblockplus/manifests/host/statsmaster.pp
+++ b/modules/adblockplus/manifests/host/statsmaster.pp
@@ -5,6 +5,25 @@
#
define adblockplus::host::statsmaster {
+ $ensure = getparam(Adblockplus::Host[$title], 'ensure')
+ $role = getparam(Adblockplus::Host[$title], 'role')
+
realize(Host[$title])
realize(Sshkey[$title])
+
+ # https://issues.adblockplus.org/ticket/3638#comment:17
+ if ($role == 'filterserver') and ($ensure == 'present') {
+
+ include sitescripts
+ $fqdn = getparam(Adblockplus::Host[$title], 'fqdn')
+
+ sitescripts::configfragment {"mirror#$title":
+ content => join([
+ "# Filter mirror $fqdn",
+ "mirror_$name=subscription ssh://stats@$fqdn/access_log_easylist_downloads.1.gz",
+ "mirror_n_$name=notification ssh://stats@$fqdn/access_log_notification.1.gz",
+ ""
+ ], "\n"),
+ }
+ }
}
« no previous file with comments | « no previous file | modules/statsmaster/templates/sitescripts.ini.erb » ('j') | modules/statsmaster/templates/sitescripts.ini.erb » ('J')

Powered by Google App Engine
This is Rietveld