Mark Bergsma has submitted this change and it was merged.
Change subject: Introduce an $extra_vcl instance parameter, use it for zero
......................................................................
Introduce an $extra_vcl instance parameter, use it for zero
Change-Id: Ibd0570871f4eec754e5d4da191355bfdf1689a55
---
M manifests/role/cache.pp
M manifests/varnish.pp
2 files changed, 12 insertions(+), 2 deletions(-)
Approvals:
Mark Bergsma: Looks good to me, approved
jenkins-bot: Verified
diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index 8c9ff20..1545a7a 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -885,6 +885,7 @@
varnish::instance { "mobile-frontend":
name => "frontend",
vcl => "mobile-frontend",
+ extra_vcl => ["zero"],
port => 80,
admin_port => 6082,
directors => {
diff --git a/manifests/varnish.pp b/manifests/varnish.pp
index b61d4b8..ff4961a 100644
--- a/manifests/varnish.pp
+++ b/manifests/varnish.pp
@@ -48,16 +48,23 @@
content =>
template("varnish/geoip.inc.vcl.erb");
"/etc/varnish/device-detection.inc.vcl":
content =>
template("varnish/device-detection.inc.vcl.erb");
- "/etc/varnish/zero.inc.vcl":
- content => template("varnish/zero.inc.vcl.erb");
"/etc/varnish/errorpage.inc.vcl":
content =>
template("varnish/errorpage.inc.vcl.erb");
+ }
+ }
+
+ define extra-vcl($instancesuffix) {
+ file { "/etc/varnish/${title}.inc.vcl":
+ content => template("varnish/${title}.inc.vcl.erb"),
+ notify => Exec["load-new-vcl-file${instancesuffix}"],
+ mode => 0444;
}
}
define instance(
$name="",
$vcl = "",
+ $extra_vcl = [],
$port="80",
$admin_port="6083",
$storage="-s malloc,1G",
@@ -97,6 +104,8 @@
# Install VCL include files shared by all instances
require "varnish::common-vcl"
+ extra-vcl { $extra_vcl: instancesuffix => $instancesuffix }
+
file {
"/etc/init.d/varnish${instancesuffix}":
content => template("varnish/varnish.init.erb"),
--
To view, visit https://gerrit.wikimedia.org/r/66116
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd0570871f4eec754e5d4da191355bfdf1689a55
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma <[email protected]>
Gerrit-Reviewer: Mark Bergsma <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits