Retire this repo
The opendev project has been moving away from puppet and this is one of the puppet modules that is no longer used. To simplify things for us we are taking the extra step of retiring this repo. Change-Id: I1e1d3a52022f996e3b28362a6bd97114e494d378
This commit is contained in:
parent
d476171f72
commit
45b7bcaa85
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
Gemfile.lock
|
||||
.bundled_gems/
|
15
Gemfile
15
Gemfile
@ -1,15 +0,0 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
if File.exists?('/home/zuul/src/git.openstack.org/openstack-infra/puppet-openstack_infra_spec_helper')
|
||||
gem_checkout_method = {:path => '/home/zuul/src/git.openstack.org/openstack-infra/puppet-openstack_infra_spec_helper'}
|
||||
else
|
||||
gem_checkout_method = {:git => 'https://git.openstack.org/openstack-infra/puppet-openstack_infra_spec_helper'}
|
||||
end
|
||||
gem_checkout_method[:require] = false
|
||||
|
||||
group :development, :test, :system_tests do
|
||||
gem 'puppet-openstack_infra_spec_helper',
|
||||
gem_checkout_method
|
||||
end
|
||||
|
||||
# vim:ft=ruby
|
202
LICENSE
202
LICENSE
@ -1,202 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
9
README.md
Normal file
9
README.md
Normal file
@ -0,0 +1,9 @@
|
||||
This project is no longer maintained.
|
||||
|
||||
The contents of this repository are still available in the Git
|
||||
source code management system. To see the contents of this
|
||||
repository before it reached its end of life, please check out the
|
||||
previous commit with "git checkout HEAD^1".
|
||||
|
||||
For any further questions, please email
|
||||
service-discuss@lists.opendev.org or join #opendev on OFTC.
|
8
Rakefile
8
Rakefile
@ -1,8 +0,0 @@
|
||||
require 'rubygems'
|
||||
require 'puppetlabs_spec_helper/rake_tasks'
|
||||
require 'puppet-lint/tasks/puppet-lint'
|
||||
PuppetLint.configuration.fail_on_warnings = true
|
||||
PuppetLint.configuration.send('disable_80chars')
|
||||
PuppetLint.configuration.send('disable_autoloader_layout')
|
||||
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
|
||||
PuppetLint.configuration.send('disable_class_parameter_defaults')
|
@ -1,2 +0,0 @@
|
||||
User-agent: *
|
||||
Disallow: /
|
@ -1,21 +0,0 @@
|
||||
# Class: mediawiki::app
|
||||
#
|
||||
class mediawiki::app ($revision = 'origin/REL1_28'){
|
||||
vcsrepo { '/srv/mediawiki/w':
|
||||
ensure => present,
|
||||
provider => git,
|
||||
source => 'https://gerrit.wikimedia.org/r/mediawiki/core.git',
|
||||
revision => $revision,
|
||||
}
|
||||
exec { 'fetch_external_libraries' :
|
||||
# https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries
|
||||
# note that the files this creates are tracked in .gitignore
|
||||
command => '/usr/bin/composer update --no-dev',
|
||||
cwd => '/srv/mediawiki/w',
|
||||
refreshonly => true,
|
||||
require => Class['mediawiki::php'],
|
||||
subscribe => Vcsrepo['/srv/mediawiki/w'],
|
||||
}
|
||||
}
|
||||
|
||||
# vim:sw=2:ts=2:expandtab:textwidth=79
|
@ -1,25 +0,0 @@
|
||||
define mediawiki::extension (
|
||||
$type = 'extension',
|
||||
$ensure = latest, # keep up to date
|
||||
$source = undef, # actual default conditionally applied below
|
||||
$revision = 'origin/REL1_28',
|
||||
) {
|
||||
if $type != 'extension' and $type != 'skin' {
|
||||
fail( '$type must be extension or skin' )
|
||||
}
|
||||
if $source == undef {
|
||||
# Set our actual default for $source here since we can't interpolate $type
|
||||
# in it for the resource parameter default
|
||||
$src = "https://gerrit.wikimedia.org/r/mediawiki/${type}s/${name}.git"
|
||||
} else {
|
||||
$src = $source
|
||||
}
|
||||
|
||||
vcsrepo { "/srv/mediawiki/w/${type}s/${name}":
|
||||
ensure => $ensure,
|
||||
provider => git,
|
||||
source => $src,
|
||||
revision => $revision,
|
||||
require => Vcsrepo['/srv/mediawiki/w'],
|
||||
}
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
# Class: mediawiki::image_scaler
|
||||
#
|
||||
class mediawiki::image_scaler {
|
||||
# No ffmpeg - it should work without? If it's needed it could be a pain
|
||||
# as Ubuntu doesn't package it for trusty
|
||||
package { [
|
||||
'djvulibre-bin',
|
||||
'ffmpeg2theora',
|
||||
'fonts-arphic-ukai',
|
||||
'fonts-arphic-uming',
|
||||
'fonts-farsiweb',
|
||||
'fonts-khmeros',
|
||||
'fonts-lao',
|
||||
'fonts-lohit-beng-bengali',
|
||||
'fonts-lohit-deva',
|
||||
'fonts-lohit-gujr',
|
||||
'fonts-lohit-guru',
|
||||
'fonts-lohit-knda',
|
||||
'fonts-lohit-mlym',
|
||||
'fonts-lohit-orya',
|
||||
'fonts-lohit-taml',
|
||||
'fonts-manchufont',
|
||||
'fonts-mgopen',
|
||||
'fonts-nafees',
|
||||
'fonts-sil-abyssinica',
|
||||
'fonts-sil-ezra',
|
||||
'fonts-sil-nuosusil',
|
||||
'fonts-sil-padauk',
|
||||
'fonts-takao-gothic',
|
||||
'fonts-takao-mincho',
|
||||
'fonts-thai-tlwg',
|
||||
'fonts-tibetan-machine',
|
||||
'ghostscript',
|
||||
'gsfonts',
|
||||
'imagemagick',
|
||||
'libogg0',
|
||||
'librsvg2-bin',
|
||||
'libtheora0',
|
||||
'libvips-tools',
|
||||
'libvorbisenc2',
|
||||
'netpbm',
|
||||
'oggvideotools',
|
||||
'texlive-fonts-recommended',
|
||||
'ttf-alee',
|
||||
'ttf-arabeyes',
|
||||
'ttf-kacst',
|
||||
'ttf-liberation',
|
||||
'ttf-linux-libertine',
|
||||
'ttf-sil-scheherazade',
|
||||
'ttf-ubuntu-font-family',
|
||||
'ttf-unfonts-extra',
|
||||
'ttf-wqy-zenhei',
|
||||
'xfonts-100dpi',
|
||||
'xfonts-75dpi',
|
||||
'xfonts-base',
|
||||
'xfonts-mplus',
|
||||
'xfonts-scalable',
|
||||
]:
|
||||
ensure => present,
|
||||
}
|
||||
include tmpreaper
|
||||
}
|
@ -1,276 +0,0 @@
|
||||
# Class: mediawiki
|
||||
#
|
||||
class mediawiki(
|
||||
$mediawiki_location = '/srv/mediawiki/w',
|
||||
$mediawiki_cache_location = '/srv/mediawiki/cache',
|
||||
$mediawiki_images_location = '/srv/mediawiki-data/images',
|
||||
$role = 'all',
|
||||
$site_hostname = $::fqdn,
|
||||
$serveradmin = "webmaster@${::fqdn}",
|
||||
$ssl_cert_file = undef,
|
||||
$ssl_cert_file_contents = undef,
|
||||
$ssl_chain_file = undef,
|
||||
$ssl_chain_file_contents = undef,
|
||||
$ssl_key_file = undef,
|
||||
$ssl_key_file_contents = undef,
|
||||
$wg_recaptchasitekey = undef,
|
||||
$wg_recaptchasecretkey = undef,
|
||||
$wg_googleanalyticsaccount = undef,
|
||||
$wg_dbserver = 'localhost',
|
||||
$wg_dbname = 'wikidb',
|
||||
$wg_dbuser = 'wikiuser',
|
||||
$wg_dbpassword = undef,
|
||||
$wg_secretkey = undef,
|
||||
$wg_upgradekey = undef,
|
||||
$wg_sitename = undef,
|
||||
$wg_logo = undef,
|
||||
$favicon_path = undef,
|
||||
$wg_openidforcedprovider = 'https://login.ubuntu.com/+openid',
|
||||
$disallow_robots = false,
|
||||
) {
|
||||
|
||||
if ($role == 'app' or $role == 'all') {
|
||||
# This is equivalent to apache::dev which is not puppet3
|
||||
# compatible with puppetlabs-apache 0.0.4:
|
||||
package { 'apache2-dev':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
file { '/srv/mediawiki':
|
||||
ensure => directory,
|
||||
}
|
||||
|
||||
file { $mediawiki_cache_location:
|
||||
ensure => directory,
|
||||
recurse => true,
|
||||
owner => 'www-data',
|
||||
group => 'www-data',
|
||||
require => File['/srv/mediawiki'],
|
||||
}
|
||||
|
||||
file { '/srv/mediawiki-data':
|
||||
ensure => directory,
|
||||
}
|
||||
|
||||
file { $mediawiki_images_location:
|
||||
ensure => directory,
|
||||
recurse => true,
|
||||
owner => 'www-data',
|
||||
group => 'www-data',
|
||||
require => File['/srv/mediawiki-data'],
|
||||
}
|
||||
|
||||
file { '/srv/mediawiki/Settings.php':
|
||||
ensure => file,
|
||||
content => template('mediawiki/Settings.php.erb'),
|
||||
group => 'www-data',
|
||||
mode => '0640',
|
||||
owner => 'root',
|
||||
require => File['/srv/mediawiki'],
|
||||
}
|
||||
|
||||
if $disallow_robots == true {
|
||||
file { '/srv/mediawiki/robots.txt':
|
||||
ensure => file,
|
||||
group => 'root',
|
||||
mode => '0444',
|
||||
owner => 'root',
|
||||
source => 'puppet:///modules/mediawiki/disallow_robots.txt',
|
||||
require => File['/srv/mediawiki'],
|
||||
}
|
||||
}
|
||||
|
||||
include httpd
|
||||
include mediawiki::php
|
||||
include mediawiki::app
|
||||
|
||||
mediawiki::extension {
|
||||
[
|
||||
'AntiSpoof',
|
||||
'Babel',
|
||||
'CategoryTree',
|
||||
'CirrusSearch',
|
||||
'Cite',
|
||||
'CodeEditor',
|
||||
'Collection',
|
||||
'ConfirmEdit',
|
||||
'Echo',
|
||||
'Elastica',
|
||||
'Gadgets',
|
||||
'Mantle',
|
||||
'MobileFrontend',
|
||||
'Nuke',
|
||||
'OpenID',
|
||||
'ParserFunctions',
|
||||
'Renameuser',
|
||||
'ReplaceText',
|
||||
'Scribunto',
|
||||
'SmiteSpam',
|
||||
'SpamBlacklist',
|
||||
'SubPageList3',
|
||||
'SyntaxHighlight_GeSHi',
|
||||
'Translate',
|
||||
'UniversalLanguageSelector',
|
||||
'WikiEditor',
|
||||
'cldr',
|
||||
'googleAnalytics',
|
||||
]:
|
||||
}
|
||||
|
||||
mediawiki::extension { 'strapping':
|
||||
type => 'skin',
|
||||
source => 'https://gerrit.wikimedia.org/r/mediawiki/skins/mediawiki-strapping.git',
|
||||
}
|
||||
|
||||
file { '/srv/mediawiki/w/LocalSettings.php':
|
||||
ensure => link,
|
||||
target => '/srv/mediawiki/Settings.php',
|
||||
require => Vcsrepo['/srv/mediawiki/w'],
|
||||
}
|
||||
|
||||
package { ['libapache2-mod-php',
|
||||
'lua5.2']:
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
# To use the standard ssl-certs package snakeoil certificate, leave both
|
||||
# $ssl_cert_file and $ssl_cert_file_contents empty. To use an existing
|
||||
# certificate, specify its path for $ssl_cert_file and leave
|
||||
# $ssl_cert_file_contents empty. To manage the certificate with puppet,
|
||||
# provide $ssl_cert_file_contents and optionally specify the path to use for
|
||||
# it in $ssl_cert_file.
|
||||
if ($ssl_cert_file == undef) and ($ssl_cert_file_contents == undef) {
|
||||
$cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
|
||||
if ! defined(Package['ssl-cert']) {
|
||||
package { 'ssl-cert':
|
||||
ensure => present,
|
||||
before => Httpd::Vhost[$site_hostname],
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if $ssl_cert_file == undef {
|
||||
$cert_file = "/etc/ssl/certs/${::fqdn}.pem"
|
||||
if ! defined(File['/etc/ssl/certs']) {
|
||||
file { '/etc/ssl/certs':
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
before => File[$cert_file],
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$cert_file = $ssl_cert_file
|
||||
}
|
||||
if $ssl_cert_file_contents != undef {
|
||||
file { $cert_file:
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
content => $ssl_cert_file_contents,
|
||||
before => Httpd::Vhost[$site_hostname],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# To avoid using an intermediate certificate chain, leave both
|
||||
# $ssl_chain_file and $ssl_chain_file_contents empty. To use an existing
|
||||
# chain, specify its path for $ssl_chain_file and leave
|
||||
# $ssl_chain_file_contents empty. To manage the chain with puppet, provide
|
||||
# $ssl_chain_file_contents and optionally specify the path to use for it in
|
||||
# $ssl_chain_file.
|
||||
if ($ssl_chain_file == undef) and ($ssl_chain_file_contents == undef) {
|
||||
$chain_file = undef
|
||||
} else {
|
||||
if $ssl_chain_file == undef {
|
||||
$chain_file = "/etc/ssl/certs/${::fqdn}_intermediate.pem"
|
||||
if ! defined(File['/etc/ssl/certs']) {
|
||||
file { '/etc/ssl/certs':
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
before => File[$chain_file],
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$chain_file = $ssl_chain_file
|
||||
}
|
||||
if $ssl_chain_file_contents != undef {
|
||||
file { $chain_file:
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
content => $ssl_chain_file_contents,
|
||||
before => Httpd::Vhost[$site_hostname],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# To use the standard ssl-certs package snakeoil key, leave both
|
||||
# $ssl_key_file and $ssl_key_file_contents empty. To use an existing key,
|
||||
# specify its path for $ssl_key_file and leave $ssl_key_file_contents empty.
|
||||
# To manage the key with puppet, provide $ssl_key_file_contents and
|
||||
# optionally specify the path to use for it in $ssl_key_file.
|
||||
if ($ssl_key_file == undef) and ($ssl_key_file_contents == undef) {
|
||||
$key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'
|
||||
if ! defined(Package['ssl-cert']) {
|
||||
package { 'ssl-cert':
|
||||
ensure => present,
|
||||
before => Httpd::Vhost[$site_hostname],
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if $ssl_key_file == undef {
|
||||
$key_file = "/etc/ssl/private/${::fqdn}.key"
|
||||
if ! defined(File['/etc/ssl/private']) {
|
||||
file { '/etc/ssl/private':
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0700',
|
||||
before => File[$key_file],
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$key_file = $ssl_key_file
|
||||
}
|
||||
if $ssl_key_file_contents != undef {
|
||||
file { $key_file:
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0600',
|
||||
content => $ssl_key_file_contents,
|
||||
before => Httpd::Vhost[$site_hostname],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::httpd::vhost { $site_hostname:
|
||||
port => 443, # Is required despite not being used.
|
||||
docroot => '/var/www',
|
||||
priority => '50',
|
||||
template => 'mediawiki/apache/mediawiki.erb',
|
||||
ssl => true,
|
||||
vhost_name => $site_hostname,
|
||||
}
|
||||
httpd_mod { 'rewrite':
|
||||
ensure => present,
|
||||
before => Service['httpd'],
|
||||
}
|
||||
httpd_mod { 'expires':
|
||||
ensure => present,
|
||||
before => Service['httpd'],
|
||||
}
|
||||
}
|
||||
if ($role == 'image-scaler' or $role == 'all') {
|
||||
include mediawiki::image_scaler
|
||||
include mediawiki::php
|
||||
include mediawiki::app
|
||||
}
|
||||
}
|
||||
|
||||
# vim:sw=2:ts=2:expandtab:textwidth=79
|
@ -1,19 +0,0 @@
|
||||
# Class: mediawiki::php
|
||||
#
|
||||
class mediawiki::php {
|
||||
package { [
|
||||
'composer', # used by fetch_external_libraries in mediawiki::app
|
||||
'php',
|
||||
'php-apcu',
|
||||
'php-cli',
|
||||
'php-intl',
|
||||
'php-mbstring',
|
||||
'php-memcached',
|
||||
'php-mysql',
|
||||
'php-openid',
|
||||
'php-xml',
|
||||
]:
|
||||
ensure => present,
|
||||
}
|
||||
# TODO: apc configuration
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
{
|
||||
"name": "openstackinfra-mediawiki",
|
||||
"version": "0.0.1",
|
||||
"author": "Openstack CI",
|
||||
"summary": "Puppet module for mediawiki",
|
||||
"license": "Apache 2.0",
|
||||
"source": "https://git.openstack.org/openstack-infra/puppet-mediawiki.git",
|
||||
"project_page": "http://docs.openstack.org/infra/system-config/",
|
||||
"issues_url": "https://storyboard.openstack.org/#!/project/775",
|
||||
"operatingsystem_support": [
|
||||
{ "operatingsystem": "Ubuntu", "operatingsystemrelease": ["12.04"] }
|
||||
],
|
||||
"requirements": [
|
||||
{ "name": "pe", "version_requirement": ">= 3.2.0 < 3.4.0" },
|
||||
{ "name": "puppet", "version_requirement": "3.x" }
|
||||
],
|
||||
|
||||
"dependencies": [
|
||||
{ "name": "puppetlabs/stdlib", "version_requirement": ">= 3.2.0" },
|
||||
{ "name": "openstackinfra/httpd", "version_requirement": "0.x" },
|
||||
{ "name": "openstackinfra/vcsrepo", "version_requirement": "= 0.0.8" }
|
||||
]
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
HOSTS:
|
||||
ubuntu-server-1404-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: ubuntu-14.04-amd64
|
||||
box: puppetlabs/ubuntu-14.04-64-nocm
|
||||
box_url: https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm
|
||||
hypervisor: vagrant
|
||||
CONFIG:
|
||||
log_level: debug
|
||||
type: git
|
@ -1,10 +0,0 @@
|
||||
HOSTS:
|
||||
centos-70-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: el-7-x86_64
|
||||
hypervisor: none
|
||||
ip: 127.0.0.1
|
||||
CONFIG:
|
||||
type: foss
|
||||
set_env: false
|
@ -1,10 +0,0 @@
|
||||
HOSTS:
|
||||
ubuntu-14.04-amd64:
|
||||
roles:
|
||||
- master
|
||||
platform: ubuntu-14.04-amd64
|
||||
hypervisor: none
|
||||
ip: 127.0.0.1
|
||||
CONFIG:
|
||||
type: foss
|
||||
set_env: false
|
@ -1,10 +0,0 @@
|
||||
HOSTS:
|
||||
ubuntu-16.04-amd64:
|
||||
roles:
|
||||
- master
|
||||
platform: ubuntu-16.04-amd64
|
||||
hypervisor: none
|
||||
ip: 127.0.0.1
|
||||
CONFIG:
|
||||
type: foss
|
||||
set_env: false
|
@ -1,341 +0,0 @@
|
||||
<?php
|
||||
## Uncomment this to disable output compression
|
||||
# $wgDisableOutputCompression = true;
|
||||
|
||||
<% if @wg_sitename != nil %>
|
||||
$wgSitename = "<%= @wg_sitename %>";
|
||||
<% end %>
|
||||
|
||||
## The URL base path to the directory containing the wiki;
|
||||
## defaults for all runtime URL paths are based off of this.
|
||||
## For more information on customizing the URLs
|
||||
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
|
||||
## http://www.mediawiki.org/wiki/Manual:Short_URL
|
||||
$wgScriptPath = "/w";
|
||||
$wgScriptExtension = ".php";
|
||||
$wgArticlePath = '/wiki/$1';
|
||||
|
||||
## The protocol and server name to use in fully-qualified URLs
|
||||
$wgServer = "https://<%= @site_hostname %>";
|
||||
|
||||
## The relative URL path to the skins directory
|
||||
$wgStylePath = "$wgScriptPath/skins";
|
||||
|
||||
<% if @wg_logo != nil %>
|
||||
## The relative URL path to the logo. Make sure you change this from the
|
||||
## default, or else you'll overwrite your logo when you upgrade!
|
||||
$wgLogo = "<%= @wg_logo %>";
|
||||
<% end %>
|
||||
|
||||
## UPO means: this is also a user preference option
|
||||
|
||||
$wgEnableEmail = true;
|
||||
$wgEnableUserEmail = true; # UPO
|
||||
$wgRequirePasswordforEmailChange = false;
|
||||
|
||||
$wgEmergencyContact = "<%= @serveradmin %>";
|
||||
$wgPasswordSender = "<%= @serveradmin %>";
|
||||
|
||||
$wgEnotifUserTalk = true; # UPO
|
||||
$wgEnotifWatchlist = true; # UPO
|
||||
$wgEmailAuthentication = true;
|
||||
|
||||
## Database settings
|
||||
$wgDBtype = "mysql";
|
||||
$wgDBserver = "<%= @wg_dbserver %>";
|
||||
$wgDBname = "<%= @wg_dbname %>";
|
||||
$wgDBuser = "<%= @wg_dbuser %>";
|
||||
$wgDBpassword = "<%= @wg_dbpassword %>";
|
||||
|
||||
# MySQL specific settings
|
||||
$wgDBprefix = "";
|
||||
|
||||
# MySQL table options to use during installation or update
|
||||
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
|
||||
|
||||
# Experimental charset support for MySQL 5.0.
|
||||
$wgDBmysql5 = false;
|
||||
|
||||
# TODO: add a cron to run jobs and set this
|
||||
#$wgJobRunRate = 0;
|
||||
|
||||
# Disable showing IP in the header (which break frontend caching)
|
||||
$wgShowIPinHeader = false;
|
||||
|
||||
$wgDisableCounters = true;
|
||||
|
||||
$wgCacheDirectory = "<%= @mediawiki_cache_location %>";
|
||||
|
||||
# New-style Object cache (and session) settings
|
||||
$wgObjectCaches['memcached-pecl'] = array(
|
||||
'class' => 'MemcachedPeclBagOStuff',
|
||||
#'serializer' => 'igbinary',
|
||||
'servers' => array(
|
||||
'127.0.0.1:11000',
|
||||
)
|
||||
);
|
||||
|
||||
$wgMainCacheType = 'memcached-pecl';
|
||||
$wgParserCacheType = 'memcached-pecl';
|
||||
$wgMessageCacheType = 'memcached-pecl';
|
||||
$wgMemCachedPersistent = false;
|
||||
$wgUseMemCached = true;
|
||||
$wgMemCachedTimeout = 250000;
|
||||
$wgMemCachedInstanceSize = 2000;
|
||||
$wgSessionCacheType = 'memcached-pecl';
|
||||
$wgSessionsInObjectCache = true;
|
||||
|
||||
## Old-style Shared memory settings
|
||||
#$wgMainCacheType = CACHE_MEMCACHED;
|
||||
#$wgParserCacheType = CACHE_MEMCACHED;
|
||||
#$wgMessageCacheType = CACHE_MEMCACHED;
|
||||
#$wgSessionsInMemcached = true;
|
||||
#$wgMemCachedServers = array( '127.0.0.1:11000' );
|
||||
|
||||
#TODO: generate the interwiki cdb and place it in the cache directory; ugh,
|
||||
# seems this is Wikimedia specific for now (bug 33395)
|
||||
#$wgInterwikiCache = "$wgCacheDirectory/interwiki.cdb";
|
||||
|
||||
$wgCookieSecure = true;
|
||||
|
||||
$wgAllowUserCss = true;
|
||||
$wgAllowUserJs = true;
|
||||
|
||||
## To enable image uploads, make sure the 'images' directory
|
||||
## is writable, then set this to true:
|
||||
$wgEnableUploads = false;
|
||||
$wgUseImageMagick = true;
|
||||
$wgImageMagickConvertCommand = "/usr/bin/convert";
|
||||
$wgUploadDirectory = "<%= @mediawiki_images_location %>";
|
||||
$wgFileExtensions[] = 'svg';
|
||||
|
||||
# InstantCommons allows wiki to use images from http://commons.wikimedia.org
|
||||
$wgUseInstantCommons = false;
|
||||
|
||||
## If you use ImageMagick (or any other shell command) on a
|
||||
## Linux server, this will need to be set to the name of an
|
||||
## available UTF-8 locale
|
||||
$wgShellLocale = "en_US.utf8";
|
||||
|
||||
# Site language code, should be one of the list in ./languages/Names.php
|
||||
$wgLanguageCode = "en";
|
||||
|
||||
$wgSecretKey = "<%= @wg_secretkey %>";
|
||||
|
||||
# Site upgrade key. Must be set to a string (default provided) to turn on the
|
||||
# web installer while LocalSettings.php is in place
|
||||
$wgUpgradeKey = "<%= @wg_upgradekey %>";
|
||||
|
||||
## For attaching licensing metadata to pages, and displaying an
|
||||
## appropriate copyright notice / icon. GNU Free Documentation
|
||||
## License and Creative Commons licenses are supported so far.
|
||||
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
|
||||
$wgRightsUrl = "";
|
||||
$wgRightsText = "";
|
||||
$wgRightsIcon = "";
|
||||
|
||||
# Path to the GNU diff3 utility. Used for conflict resolution.
|
||||
$wgDiff3 = "/usr/bin/diff3";
|
||||
|
||||
# Query string length limit for ResourceLoader. You should only set this if
|
||||
# your web server has a query string length limit (then set it to that limit),
|
||||
# or if you have suhosin.get.max_value_length set in php.ini (then set it to
|
||||
# that value)
|
||||
$wgResourceLoaderMaxQueryLength = -1;
|
||||
|
||||
# Only allow logged-in users to edit
|
||||
$wgGroupPermissions['*']['edit'] = false;
|
||||
|
||||
## Content suppression (for *really* nasty spam or DMCA notices)
|
||||
# Allow sysops to hide revisions/log items from users
|
||||
$wgGroupPermissions['sysop']['deleterevision'] = true;
|
||||
$wgGroupPermissions['sysop']['createaccount'] = true;
|
||||
# Allow members of the suppress group to hide usernames from users and Sysops
|
||||
$wgGroupPermissions['suppress']['hideuser'] = true;
|
||||
# Allow members of the suppress group to hide revisions/log items from users and Sysops
|
||||
$wgGroupPermissions['suppress']['deleterevision'] = true;
|
||||
$wgGroupPermissions['suppress']['suppressrevision'] = true;
|
||||
# Allow members of the suppress group to see the supression log
|
||||
$wgGroupPermissions['suppress']['suppressionlog'] = true;
|
||||
|
||||
# Allow known-good users to be listed in an 'autopatrol' group so their
|
||||
# edits are automatically marked as 'patrolled'
|
||||
$wgGroupPermissions['autopatrol']['autopatrol'] = true;
|
||||
# Autopatrol users are legit, so don't need a CAPTCHA
|
||||
$wgGroupPermissions['autopatrol']['skipcaptcha'] = true;
|
||||
|
||||
# Only let known-good users upload files
|
||||
$wgGroupPermissions['user']['upload'] = false;
|
||||
$wgGroupPermissions['autopatrol']['upload'] = true;
|
||||
|
||||
# Only let known-good users move pages and files
|
||||
$wgGroupPermissions['user']['move'] = false;
|
||||
$wgGroupPermissions['autopatrol']['move'] = true;
|
||||
|
||||
# Only let known-good users the write API
|
||||
$wgGroupPermissions['user']['writeapi'] = false;
|
||||
$wgGroupPermissions['autopatrol']['writeapi'] = true;
|
||||
|
||||
|
||||
# rate limit page creation by non-verified users to 5 per day
|
||||
$wgRateLimits['createpage']['user'] = array(5, 86400);
|
||||
|
||||
# Useful for debugging purposes, and doesn't expose very sensitive info
|
||||
$wgShowExceptionDetails = true;
|
||||
|
||||
$wgEnableCreativeCommonsRdf = true;
|
||||
$wgRightsPage = "";
|
||||
$wgRightsUrl = "http://creativecommons.org/licenses/by/3.0/";
|
||||
$wgRightsText = "Attribution 3.0 Unported (CC BY 3.0)";
|
||||
$wgRightsIcon = "{$wgStylePath}/common/images/cc-by.png";
|
||||
|
||||
$wgNamespacesWithSubpages[NS_MAIN] = 1;
|
||||
|
||||
## Skins
|
||||
|
||||
$wgSkipSkins = array("chick", "cologneblue", "nostalgia", "simple", "standard", "monobook", "modern", "myskin", "vector");
|
||||
require_once( "$IP/skins/strapping/strapping.php" );
|
||||
$wgDefaultSkin = "strapping";
|
||||
$wgStrappingSkinLogoLocation = 'navbar';
|
||||
$wgStrappingSkinLoginLocation = 'navbar';
|
||||
$wgStrappingSkinAnonNavbar = true;
|
||||
$wgStrappingSkinUseStandardLayout = false;
|
||||
$wgStrappingSkinDisplaySidebarNavigation = false;
|
||||
|
||||
$wgExtraNamespaces[110] = 'Obsolete';
|
||||
$wgExtraNamespaces[111] = 'Obsolete_talk';
|
||||
$wgNamespacesWithSubpages[110] = true;
|
||||
|
||||
## Extensions
|
||||
# https://www.mediawiki.org/wiki/Extension:QuestyCaptcha
|
||||
require_once( "$IP/extensions/ConfirmEdit/ConfirmEdit.php" );
|
||||
|
||||
#Enable ReCaptchaNoCaptcha
|
||||
wfLoadExtensions( array( 'ConfirmEdit', 'ConfirmEdit/ReCaptchaNoCaptcha' ) );
|
||||
$wgCaptchaClass = 'ReCaptchaNoCaptcha';
|
||||
$wgReCaptchaSiteKey = "<%= @wg_recaptchasitekey %>";
|
||||
$wgReCaptchaSecretKey = "<%= @wg_recaptchasecretkey %>";
|
||||
|
||||
$wgMainCacheType = CACHE_ANYTHING;
|
||||
$wgCaptchaTriggers['edit'] = true;
|
||||
$wgCaptchaTriggers['create'] = true;
|
||||
$wgCaptchaTriggers['createtalk'] = true;
|
||||
$wgCaptchaTriggers['addurl'] = true;
|
||||
$wgCaptchaTriggers['createaccount'] = true;
|
||||
$wgCaptchaTriggers['badlogin'] = true;
|
||||
|
||||
|
||||
#OpenID
|
||||
require_once( "$IP/extensions/OpenID/OpenID.php" );
|
||||
|
||||
# Don't disallow non-openid logins
|
||||
$wgOpenIDOnly = false;
|
||||
# Automatically mark email addreses provided by openid as verified
|
||||
$wgOpenIDTrustEmailAddress = true;
|
||||
# When first-time logging-in with OpenID, use the part before the @ in any given
|
||||
# e-mail address as the username if a nickname is not given by the OpenID
|
||||
$wgOpenIDUseEmailAsNickname = true;
|
||||
# Our servername
|
||||
$wgTrustRoot = "https://<%= @site_hostname %>/";
|
||||
# Only allow login through a specific OpenID provider
|
||||
$wgOpenIDForcedProvider = "<%= @wg_openidforcedprovider %>";
|
||||
$wgOpenIDAllowExistingAccountSelection = false;
|
||||
$wgOpenIDAllowAutomaticUsername = false;
|
||||
|
||||
require_once( "$IP/extensions/Renameuser/Renameuser.php" );
|
||||
|
||||
require_once( "$IP/extensions/WikiEditor/WikiEditor.php" );
|
||||
$wgDefaultUserOptions['usebetatoolbar'] = 1;
|
||||
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
|
||||
|
||||
# Add syntax highlighting and such to the editor when editing code
|
||||
require "$IP/extensions/CodeEditor/CodeEditor.php";
|
||||
|
||||
require( "$IP/extensions/Scribunto/Scribunto.php" );
|
||||
$wgScribuntoDefaultEngine = 'luastandalone';
|
||||
$wgScribuntoUseGeSHi = true;
|
||||
$wgScribuntoUseCodeEditor = true;
|
||||
$wgScribuntoEngineConf['luastandalone']['luaPath'] = '/usr/bin/lua';
|
||||
|
||||
# Globally enableable Javascript gadgets
|
||||
require_once( "$IP/extensions/Gadgets/Gadgets.php" );
|
||||
|
||||
require_once("$IP/extensions/CategoryTree/CategoryTree.php");
|
||||
|
||||
require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php");
|
||||
|
||||
# Syntax highlighting of in-content code via <source lang="blah"></source>
|
||||
require_once( "$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php" );
|
||||
|
||||
# Proper citations
|
||||
require_once( "$IP/extensions/Cite/Cite.php" );
|
||||
|
||||
# Extension which provides localised language names based on CLDR data
|
||||
require_once( "$IP/extensions/cldr/cldr.php" );
|
||||
|
||||
# Extension to easily allow users to display languages they speak on their user pages
|
||||
require_once( "$IP/extensions/Babel/Babel.php" );
|
||||
|
||||
# Interface for translating page contents
|
||||
require_once( "$IP/extensions/Translate/Translate.php" );
|
||||
$wgGroupPermissions['user']['translate'] = true;
|
||||
$wgTranslateDocumentationLanguageCode = 'info';
|
||||
$wgGroupPermissions['sysop']['pagetranslation'] = true;
|
||||
$wgEnablePageTranslation = true;
|
||||
|
||||
# Interface for creating pdfs and books
|
||||
require_once("$IP/extensions/Collection/Collection.php");
|
||||
$wgGroupPermissions['user']['collectionsaveascommunitypage'] = true;
|
||||
$wgGroupPermissions['user']['collectionsaveasuserpage'] = true;
|
||||
|
||||
# Extension to allow admins to mass delete pages (useful for spam)
|
||||
require_once("$IP/extensions/Nuke/Nuke.php");
|
||||
|
||||
# Prevent creation of usernames that are meant to spoof other users (useful for spam)
|
||||
require_once( "$IP/extensions/AntiSpoof/AntiSpoof.php" );
|
||||
|
||||
include_once("$IP/extensions/Mantle/Mantle.php");
|
||||
|
||||
#TODO: add MobileFrontend - requires device detection, which means we need varnish
|
||||
# Mobile view of the site
|
||||
require_once("$IP/extensions/MobileFrontend/MobileFrontend.php");
|
||||
$wgMFAutodetectMobileView = true;
|
||||
|
||||
require_once( "$IP/extensions/SubPageList3/SubPageList3.php" );
|
||||
|
||||
require_once( "$IP/extensions/ReplaceText/ReplaceText.php" );
|
||||
$wgGroupPermissions['sysop']['replacetext'] = true;
|
||||
|
||||
require_once( "$IP/extensions/googleAnalytics/googleAnalytics.php" );
|
||||
$wgGoogleAnalyticsAccount = "<%= @wg_googleanalyticsaccount %>";
|
||||
|
||||
require_once( "$IP/extensions/Echo/Echo.php" );
|
||||
|
||||
# Disabled for now, due to weird interface positioning
|
||||
require_once( "$IP/extensions/UniversalLanguageSelector/UniversalLanguageSelector.php" );
|
||||
$wgULSPosition = 'personal';
|
||||
$wgULSGeoService = true;
|
||||
|
||||
require_once( "$IP/extensions/Elastica/Elastica.php" );
|
||||
require_once( "$IP/extensions/CirrusSearch/CirrusSearch.php" );
|
||||
$wgCirrusSearchServers = array( '127.0.0.1' );
|
||||
$wgCirrusSearchShardCount = array( 'content' => 5, 'general' => 5 );
|
||||
$wgSearchType = 'CirrusSearch';
|
||||
|
||||
# Extension:SpamBlacklist
|
||||
require_once "$IP/extensions/SpamBlacklist/SpamBlacklist.php";
|
||||
$wgSpamBlacklistFiles = array(
|
||||
"https://meta.wikimedia.org/w/index.php?title=Spam_blacklist&action=raw&sb_ver=1",
|
||||
"https://en.wikipedia.org/w/index.php?title=MediaWiki:Spam-blacklist&action=raw&sb_ver=1"
|
||||
);
|
||||
|
||||
# Disable password based login
|
||||
function disableSomeSpecialPages(&$list) {
|
||||
unset($list['Userlogin']);
|
||||
return true;
|
||||
}
|
||||
$wgHooks['SpecialPage_initList'][]='disableSomeSpecialPages';
|
||||
|
||||
# Extension:SmiteSpam
|
||||
# https://www.mediawiki.org/wiki/Extension:SmiteSpam
|
||||
require_once "$IP/extensions/SmiteSpam/SmiteSpam.php";
|
@ -1,134 +0,0 @@
|
||||
# ************************************
|
||||
# Managed by Puppet
|
||||
# ************************************
|
||||
|
||||
# Unconditionally redirect all HTTP traffic for this vhost to HTTPS
|
||||
<VirtualHost *:80>
|
||||
ServerName <%= @vhost_name %>
|
||||
ServerAdmin <%= scope['mediawiki::serveradmin'] %>
|
||||
RewriteEngine On
|
||||
RewriteRule ^/(.*) https://<%= @vhost_name %>/$1 [last,redirect=permanent]
|
||||
LogLevel warn
|
||||
ErrorLog /var/log/apache2/<%= @vhost_name %>_error.log
|
||||
CustomLog /var/log/apache2/<%= @vhost_name %>_access.log combined
|
||||
ServerSignature Off
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:443>
|
||||
|
||||
ServerName <%= @vhost_name %>
|
||||
ServerAdmin <%= scope['mediawiki::serveradmin'] %>
|
||||
|
||||
SSLEngine on
|
||||
SSLProtocol All -SSLv2 -SSLv3
|
||||
# Once the machine is using something to terminate TLS that supports ECDHE
|
||||
# then this should be edited to remove the RSA+AESGCM:RSA+AES so that PFS
|
||||
# only is guaranteed.
|
||||
SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!AES256:!aNULL:!eNULL:!MD5:!DSS:!PSK:!SRP
|
||||
SSLHonorCipherOrder on
|
||||
SSLCertificateFile <%= scope['mediawiki::cert_file'] %>
|
||||
SSLCertificateKeyFile <%= scope['mediawiki::key_file'] %>
|
||||
<% unless [nil, :undef].include?(scope['mediawiki::chain_file']) %>
|
||||
SSLCertificateChainFile <%= scope['mediawiki::chain_file'] %>
|
||||
<% end %>
|
||||
|
||||
RedirectMatch ^/$ https://<%= @vhost_name %>/wiki/
|
||||
|
||||
DocumentRoot <%= @docroot %>
|
||||
|
||||
<Directory />
|
||||
Options FollowSymLinks
|
||||
AllowOverride None
|
||||
</Directory>
|
||||
|
||||
<Directory /var/www/>
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
AllowOverride None
|
||||
Order allow,deny
|
||||
allow from all
|
||||
</Directory>
|
||||
|
||||
<Directory "<%= scope['mediawiki::mediawiki_images_location'] %>">
|
||||
# Ignore .htaccess files
|
||||
AllowOverride None
|
||||
|
||||
# Serve HTML as plaintext, don't execute SHTML
|
||||
AddType text/plain .html .htm .shtml .php
|
||||
|
||||
# Don't run arbitrary PHP code.
|
||||
php_admin_flag engine off
|
||||
|
||||
# Allow access to serve images
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
<Directory "<%= scope['mediawiki::mediawiki_location'] %>">
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
<IfModule mod_expires.c>
|
||||
ExpiresActive On
|
||||
<Directory "<%= scope['mediawiki::mediawiki_location'] %>">
|
||||
<FilesMatch "\.(gif|jpe?g|png|css|js|woff|svg|eot|ttf)$">
|
||||
ExpiresByType image/gif A2592000
|
||||
ExpiresByType image/png A2592000
|
||||
ExpiresByType image/jpeg A2592000
|
||||
ExpiresByType text/css A2592000
|
||||
ExpiresByType text/javascript A2592000
|
||||
ExpiresByType application/x-javascript A2592000
|
||||
ExpiresByType application/x-font-woff A2592000
|
||||
ExpiresByType image/svg+xml A2592000
|
||||
ExpiresByType application/vnd.ms-fontobject A2592000
|
||||
ExpiresByType application/x-font-ttf A2592000
|
||||
## I think it's likely dangerous to enable this for the entire domain.
|
||||
## I'm nearly positive we only need to do so for the WebFonts.
|
||||
## For now I'm going to keep this disabled.
|
||||
#Header add Access-Control-Allow-Origin "*"
|
||||
</FilesMatch>
|
||||
</Directory>
|
||||
</IfModule>
|
||||
|
||||
AddType application/x-font-woff .woff
|
||||
AddType application/vnd.ms-fontobject .eot
|
||||
|
||||
# TTF doesn't have an official MIME type, but I really don't want to use application/octet-stream for it
|
||||
AddType application/x-font-ttf .ttf
|
||||
|
||||
Alias /w/images <%= scope['mediawiki::mediawiki_images_location'] %>
|
||||
Alias /w <%= scope['mediawiki::mediawiki_location'] %>
|
||||
Alias /wiki <%= scope['mediawiki::mediawiki_location'] %>/index.php
|
||||
|
||||
<% if scope['mediawiki::favicon_path'] != nil %>
|
||||
Alias /favicon.ico <%= scope['mediawiki::favicon_path'] %>
|
||||
<Directory "<%= scope['mediawiki::favicon_path'] %>">
|
||||
Require all granted
|
||||
</Directory>
|
||||
<% end %>
|
||||
|
||||
<% if scope['mediawiki::disallow_robots'] == true %>
|
||||
# Request that search engines not index this site
|
||||
Alias /robots.txt /srv/mediawiki/robots.txt
|
||||
<Directory "/srv/mediawiki/robots.txt">
|
||||
Require all granted
|
||||
</Directory>
|
||||
<% end %>
|
||||
|
||||
# Redirect old /Article_Name urls
|
||||
RewriteEngine on
|
||||
<% if scope['mediawiki::disallow_robots'] == true %>
|
||||
RewriteCond %{REQUEST_URI} !^/robots.txt$
|
||||
<% end %>
|
||||
RewriteCond %{REQUEST_URI} !^/w/
|
||||
RewriteCond %{REQUEST_URI} !^/wiki/
|
||||
RewriteRule ^/(.*)$ https://<%= @vhost_name %>/wiki/$1 [L,R]
|
||||
|
||||
# Possible values include: debug, info, notice, warn, error, crit,
|
||||
# alert, emerg.
|
||||
LogLevel warn
|
||||
|
||||
ErrorLog /var/log/apache2/<%= @vhost_name %>_error.log
|
||||
CustomLog /var/log/apache2/<%= @vhost_name %>_access.log combined
|
||||
|
||||
ServerSignature Off
|
||||
|
||||
</VirtualHost>
|
Loading…
Reference in New Issue
Block a user