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

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

Issue 29367252: Issue 4728 - Remove hard-coded references from statsmaster sitescripts.ini template (Closed)
Patch Set: Created Dec. 12, 2016, 2:19 p.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
« no previous file with comments | « no previous file | modules/statsmaster/templates/sitescripts.ini.erb » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/adblockplus/manifests/host/statsmaster.pp
diff --git a/modules/adblockplus/manifests/host/statsmaster.pp b/modules/adblockplus/manifests/host/statsmaster.pp
index aa3e51efb86dcd66f2ff2f8582e1b91e9a9eb422..59cead7df9e24b284ca66be147b2e8fb94b5413f 100644
--- a/modules/adblockplus/manifests/host/statsmaster.pp
+++ b/modules/adblockplus/manifests/host/statsmaster.pp
@@ -11,19 +11,44 @@ define adblockplus::host::statsmaster {
realize(Host[$title])
realize(Sshkey[$title])
- # https://issues.adblockplus.org/ticket/3638#comment:17
- if ($role == 'filterserver') and ($ensure == 'present') {
+ if $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"),
+ # https://issues.adblockplus.org/ticket/3638#comment:17
+ if $role == 'filterserver' {
+
+ 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"),
+ }
+ }
+
+ # https://issues.adblockplus.org/ticket/4728
+ if $role == 'downloadserver' {
+
+ sitescripts::configfragment {"mirror#$title":
+ content => join([
+ "# Download mirror $fqdn",
+ "mirror_$name=download ssh://stats@$fqdn/access_log_downloads.1.gz",
+ ""
+ ], "\n"),
+ }
+ }
+ elsif $role == 'updateserver' {
+
+ sitescripts::configfragment {"mirror#$title":
+ content => join([
+ "# Update mirror $fqdn",
+ "mirror_$name=update ssh://stats@$fqdn/access_log_update.1.gz",
+ ""
+ ], "\n"),
+ }
}
}
}
« no previous file with comments | « no previous file | modules/statsmaster/templates/sitescripts.ini.erb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld