Alexandros Kosiaris has submitted this change and it was merged.
Change subject: url_downloader: Vary squid config base on OS version
......................................................................
url_downloader: Vary squid config base on OS version
Trusty has squid 3.3 which contains embedded 3 ACLs which are not
present in precise's squid 3.1. Squid 3.3 will not start with those 3
ACLs defined in the configuration. Based on the os_version function prepend
the ACLs on precise and don't include them on trusty
Change-Id: I588f9e65d78c8c87cae1bcfd6b40f56477d52c62
---
M manifests/role/url_downloader.pp
A templates/url_downloader/precise_acls_conf.erb
M templates/url_downloader/squid.conf.erb
3 files changed, 11 insertions(+), 5 deletions(-)
Approvals:
Alexandros Kosiaris: Looks good to me, approved
jenkins-bot: Verified
diff --git a/manifests/role/url_downloader.pp b/manifests/role/url_downloader.pp
index 61a09aa..28014a7 100644
--- a/manifests/role/url_downloader.pp
+++ b/manifests/role/url_downloader.pp
@@ -26,8 +26,14 @@
description => 'Upload-by-URL proxy'
}
+ if os_version('ubuntu >= trusty') {
+ $config_content = template('url_downloader/squid.conf.erb')
+ } else {
+ $config_content = template('url_downloader/precise_acls_conf.erb',
'url_downloader/squid.conf.erb')
+ }
+
class { 'squid3':
- config_content => template('url_downloader/squid.conf.erb'),
+ config_content => $config_content,
}
# Firewall
diff --git a/templates/url_downloader/precise_acls_conf.erb
b/templates/url_downloader/precise_acls_conf.erb
new file mode 100644
index 0000000..8345851
--- /dev/null
+++ b/templates/url_downloader/precise_acls_conf.erb
@@ -0,0 +1,4 @@
+# The following 3 are built-in in squid 3.3 but not squid 3.1
+acl manager proto cache_object
+acl localhost src 127.0.0.1/255.255.255.255
+acl to_localhost dst 127.0.0.0/8
diff --git a/templates/url_downloader/squid.conf.erb
b/templates/url_downloader/squid.conf.erb
index ff9458b..8ca641e 100644
--- a/templates/url_downloader/squid.conf.erb
+++ b/templates/url_downloader/squid.conf.erb
@@ -4,10 +4,6 @@
http_port <%= @url_downloader_ip %>:8080
hierarchy_stoplist cgi-bin ?
-# The following 3 are built-in in squid 3.3 but not squid 3.1
-acl manager proto cache_object
-acl localhost src 127.0.0.1/255.255.255.255
-acl to_localhost dst 127.0.0.0/8
acl everything src all
cache deny everything
--
To view, visit https://gerrit.wikimedia.org/r/191015
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I588f9e65d78c8c87cae1bcfd6b40f56477d52c62
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits