Giuseppe Lavagetto has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/159495

Change subject: pybal: serve the virtualhost with pybal lb files with a 
dedicated vhost
......................................................................

pybal: serve the virtualhost with pybal lb files with a dedicated vhost

Change-Id: I030d8ccd9f77da50a2ba1509bbd953bdce1bcbc9
Signed-off-by: Giuseppe Lavagetto <[email protected]>
---
A modules/pybal/manifests/web.pp
A modules/pybal/templates/config-vhost.conf.erb
2 files changed, 45 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/95/159495/1

diff --git a/modules/pybal/manifests/web.pp b/modules/pybal/manifests/web.pp
new file mode 100644
index 0000000..887c594
--- /dev/null
+++ b/modules/pybal/manifests/web.pp
@@ -0,0 +1,22 @@
+class pybal::web ($ensure = 'present', $hostname == 
'pybal-config.wikimedia.org') {
+
+    include wmflib
+
+    $is_24 = ubuntu_version('>= trusty')
+
+    apache::site { 'pybal-config':
+        ensure => $ensure,
+        priority => 50,
+        content  => template('pybal/config-vhost.conf.erb'),
+        notify   => Service['apache2'],
+        require  => File['/srv/pybal-config']
+    }
+
+    file { '/srv/pybal-config':
+        ensure => ensure_directory($ensure),
+        owner  => 'root',
+        group  => 'root',
+        mode   => '0755',
+    }
+
+}
diff --git a/modules/pybal/templates/config-vhost.conf.erb 
b/modules/pybal/templates/config-vhost.conf.erb
new file mode 100644
index 0000000..e796aa8
--- /dev/null
+++ b/modules/pybal/templates/config-vhost.conf.erb
@@ -0,0 +1,23 @@
+<VirtualHost *:80>
+    ServerName pybal-config
+    ServerAlias <%= @hostname %>
+    
+    DocumentRoot /srv/pybal-config
+
+    <Directory "/srv/pybal-config">
+ <%= if @is_24 -%>
+         Require all granted
+<%= else -%>
+         Order allow,deny
+         Allow from all
+<% end -%>
+         Options +Indexes -Followsymlinks
+         AllowOverride None
+     </Directory>
+
+     CustomLog ${APACHE_LOG_DIR}/pybal-access.log combined
+     ErrorLog ${APACHE_LOG_DIR}/pybal-error.log
+</VirtualHost>
+
+
+<!-- The ssl virtual host will be added if needed -->

-- 
To view, visit https://gerrit.wikimedia.org/r/159495
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I030d8ccd9f77da50a2ba1509bbd953bdce1bcbc9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to