Faidon Liambotis has uploaded a new change for review.
https://gerrit.wikimedia.org/r/178917
Change subject: pybal: use Apache <IfVersion> instead of os_version
......................................................................
pybal: use Apache <IfVersion> instead of os_version
The Apache configuration template was having conditionals based on an
$is_24 variable, that was set in the manifest based on the operating
system's version. That's not so pretty, so convert to Apache's
<IfVersion> syntax for switching between the different configuration
directives.
Change-Id: I43e55a017cb56b219e55c7fb4b825fa1ecfdb18b
---
M modules/pybal/manifests/web.pp
M modules/pybal/templates/config-vhost.conf.erb
2 files changed, 4 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/17/178917/1
diff --git a/modules/pybal/manifests/web.pp b/modules/pybal/manifests/web.pp
index 6af9d8a..61030bf 100644
--- a/modules/pybal/manifests/web.pp
+++ b/modules/pybal/manifests/web.pp
@@ -10,8 +10,6 @@
class pybal::web ($ensure = 'present', $vhostnames =
['pybal-config.eqiad.wmnet']) {
- $is_24 = os_version('ubuntu >= trusty')
-
apache::site { 'pybal-config':
ensure => $ensure,
priority => 50,
diff --git a/modules/pybal/templates/config-vhost.conf.erb
b/modules/pybal/templates/config-vhost.conf.erb
index b1f316a..efd925d 100644
--- a/modules/pybal/templates/config-vhost.conf.erb
+++ b/modules/pybal/templates/config-vhost.conf.erb
@@ -5,12 +5,13 @@
DocumentRoot /srv/pybal-config
<Directory "/srv/pybal-config">
- <% if @is_24 -%>
+ <IfVersion >= 2.4>
Require all granted
-<% else -%>
+ </IfVersion>
+ <IfVersion < 2.4>
Order allow,deny
Allow from all
-<% end -%>
+ </IfVersion>
Options +Indexes +Followsymlinks
AllowOverride None
</Directory>
--
To view, visit https://gerrit.wikimedia.org/r/178917
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I43e55a017cb56b219e55c7fb4b825fa1ecfdb18b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits