Clean up OpenStack references and genericize
To make this module more downstream-friendly, abstract out any references to OpenStack and turn them into classvars. Change-Id: Ie005d5629623a14f4ebd8aef21294f222249232f
This commit is contained in:
parent
0af7e6addd
commit
ea9b6df992
|
@ -16,11 +16,14 @@ class mediawiki(
|
||||||
$wg_recaptchasecretkey = undef,
|
$wg_recaptchasecretkey = undef,
|
||||||
$wg_googleanalyticsaccount = undef,
|
$wg_googleanalyticsaccount = undef,
|
||||||
$wg_dbserver = 'localhost',
|
$wg_dbserver = 'localhost',
|
||||||
$wg_dbname = 'openstack_wiki',
|
$wg_dbname = 'wikidb',
|
||||||
$wg_dbuser = 'wikiuser',
|
$wg_dbuser = 'wikiuser',
|
||||||
$wg_dbpassword = undef,
|
$wg_dbpassword = undef,
|
||||||
$wg_secretkey = undef,
|
$wg_secretkey = undef,
|
||||||
$wg_upgradekey = undef,
|
$wg_upgradekey = undef,
|
||||||
|
$wg_sitename = undef,
|
||||||
|
$wg_logo = undef,
|
||||||
|
$wg_openidforcedprovider = 'https://login.launchpad.net/+openid',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if ($role == 'app' or $role == 'all') {
|
if ($role == 'app' or $role == 'all') {
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
## Uncomment this to disable output compression
|
## Uncomment this to disable output compression
|
||||||
# $wgDisableOutputCompression = true;
|
# $wgDisableOutputCompression = true;
|
||||||
|
|
||||||
$wgSitename = "OpenStack";
|
<% if @wg_sitename != nil %>
|
||||||
|
$wgSitename = "<%= @wg_sitename %>";
|
||||||
|
<% end %>
|
||||||
|
|
||||||
## The URL base path to the directory containing the wiki;
|
## The URL base path to the directory containing the wiki;
|
||||||
## defaults for all runtime URL paths are based off of this.
|
## defaults for all runtime URL paths are based off of this.
|
||||||
|
@ -14,15 +16,16 @@ $wgScriptExtension = ".php";
|
||||||
$wgArticlePath = '/wiki/$1';
|
$wgArticlePath = '/wiki/$1';
|
||||||
|
|
||||||
## The protocol and server name to use in fully-qualified URLs
|
## The protocol and server name to use in fully-qualified URLs
|
||||||
$wgServer = "https://wiki.openstack.org";
|
$wgServer = "https://<%= @site_hostname %>";
|
||||||
|
|
||||||
## The relative URL path to the skins directory
|
## The relative URL path to the skins directory
|
||||||
$wgStylePath = "$wgScriptPath/skins";
|
$wgStylePath = "$wgScriptPath/skins";
|
||||||
|
|
||||||
## The relative URL path to the logo. Make sure you change this from the default,
|
<% if @wg_logo != nil %>
|
||||||
## or else you'll overwrite your logo when you upgrade!
|
## The relative URL path to the logo. Make sure you change this from the
|
||||||
#$wgLogo = "https://wiki.openstack.org/w/images/4/4c/OpenStack.png";
|
## default, or else you'll overwrite your logo when you upgrade!
|
||||||
$wgLogo = "https://wiki.openstack.org/w/images/thumb/c/c4/OpenStack_Logo_-_notext.png/30px-OpenStack_Logo_-_notext.png";
|
$wgLogo = "<%= @wg_logo %>";
|
||||||
|
<% end %>
|
||||||
|
|
||||||
## UPO means: this is also a user preference option
|
## UPO means: this is also a user preference option
|
||||||
|
|
||||||
|
@ -30,8 +33,8 @@ $wgEnableEmail = true;
|
||||||
$wgEnableUserEmail = true; # UPO
|
$wgEnableUserEmail = true; # UPO
|
||||||
$wgRequirePasswordforEmailChange = false;
|
$wgRequirePasswordforEmailChange = false;
|
||||||
|
|
||||||
$wgEmergencyContact = "noc@openstack.org";
|
$wgEmergencyContact = "<%= @serveradmin %>";
|
||||||
$wgPasswordSender = "noc@openstack.org";
|
$wgPasswordSender = "<%= @serveradmin %>";
|
||||||
|
|
||||||
$wgEnotifUserTalk = true; # UPO
|
$wgEnotifUserTalk = true; # UPO
|
||||||
$wgEnotifWatchlist = true; # UPO
|
$wgEnotifWatchlist = true; # UPO
|
||||||
|
@ -215,10 +218,9 @@ $wgOpenIDTrustEmailAddress = true;
|
||||||
# e-mail address as the username if a nickname is not given by the OpenID
|
# e-mail address as the username if a nickname is not given by the OpenID
|
||||||
$wgOpenIDUseEmailAsNickname = true;
|
$wgOpenIDUseEmailAsNickname = true;
|
||||||
# Our servername
|
# Our servername
|
||||||
$wgTrustRoot = 'https://wiki.openstack.org/';
|
$wgTrustRoot = "https://<%= @site_hostname %>/";
|
||||||
# Only allow login through launchpad (in earlier versions of the plugin,
|
# Only allow login through a specific OpenID provider
|
||||||
# wgOpenIDConsumerForce was used instead of wgOpenIDForcedProvider)
|
$wgOpenIDForcedProvider = "<%= @wg_openidforcedprovider %>";
|
||||||
$wgOpenIDForcedProvider = 'https://login.launchpad.net/+openid';
|
|
||||||
$wgOpenIDAllowExistingAccountSelection = false;
|
$wgOpenIDAllowExistingAccountSelection = false;
|
||||||
$wgOpenIDAllowAutomaticUsername = false;
|
$wgOpenIDAllowAutomaticUsername = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue