Skip to content
Snippets Groups Projects
Commit 41e3a269 authored by Frank Duncan's avatar Frank Duncan
Browse files

Add the /help wiki ansible files

This goes in base because it's not really a competition.
parent ac52ee03
No related branches found
No related tags found
No related merge requests found
---
- hosts: mysql
become: true
become_user: "{{ deployment_user }}"
roles:
- mysql
- hosts: mediawiki
become: true
become_user: "{{ deployment_user }}"
roles:
- mediawiki
- permissions
- simplefavorites
- simplesaml
- exporttables
# This should come after permissions because of overrides of defaults
- helpwiki
# This should always go last, to run db updates and restart
- finishmediawiki
---
competition_name: help
# Root web directory (where symlinks to the mediawiki instances
# are installed)
# e.g. /var/www/html
html_directory: ${HTML_DIRECTORY}
# We need to know what user we're deploying as, but the reason
# here is complex. At the base level, we need to know what
# user torquedata should be running as. But more than that,
# we need to know who to 'become' in the ansible sense when
# we're not becoming root. The reason we have to specify
# in a different variable than 'ansible_become_user', is
# because that variable overrides task level declarations,
# thereby overriding becoming root for tasks we need to.
# So we store in a different variable and use at the top level
# in main.yml.
deployment_user: ${DEPLOYMENT_USER}
# The root password needed to install mysql users
mysql_root_password: ${MYSQL_ROOT_PASSWORD}
# The DB credentials
db_username: ${DB_USERNAME}
db_password: ${DB_PASSWORD}
# Sets the wgServer variable for mediawiki. This needs to be set
# for installations of mediawiki greater than 1.35.0, for security
# reasons. See https://phabricator.wikimedia.org/T30798
mediawiki_sever: http://localhost
# Directory to install all of the mediawiki needs
# This must be an absolute path because of weirdness with unarchive
mediawiki_install_directory: ${MEDIAWIKI_INSTALL_DIRECTORY}
# The password for the mediawiki user admin to run automated
# commands against wikis (such as csv2wiki, setup, etc)
mediawiki_admin_password: ${MEDIAWIKI_ADMIN_PASSWORD}
# Directory to install simplesaml
simplesaml_install_directory: ${SIMPLESAML_INSTALL_DIRECTORY}
# The metadata declaration, in the form of key => location. The METADATA_NAME should
# correspond to the single sign on url you have set up in okta, which will be of the form
# http://<installationbox>/simplesaml/module.php/saml/sp/saml2-acs.php/__METADATA_NAME__
#
# Then the URL here should be the metadata url you receive from okta when looking at
# your application settings for "Identity Provider metadata"
#
# See https://developer.okta.com/code/php/simplesamlphp/ for more information
simplesaml_okta_metadata_name: ${SIMPLESAML_OKTA_METADATA_NAME}
simplesaml_okta_metadata_url: ${SIMPLESAML_OKTA_METADATA_URL}
[mediawiki]
localhost ansible_connection=local
[mysql]
localhost ansible_connection=local
---
competition_name: help
db_username: help_rw
html_directory: /var/www/html
mediawiki_server: https://torque.leverforchange.org
mediawiki_install_directory: /home/deploy/help/
simplesaml_install_directory: /home/deploy/simplesaml/
deployment_user: deploy
[mediawiki]
torque.leverforchange.org ansible_ssh_user="{{ lookup('env','OTS_USERNAME') }}"
[mysql]
torque.leverforchange.org ansible_ssh_user="{{ lookup('env','OTS_USERNAME') }}"
php_value upload_max_filesize 128M
php_value post_max_size 128M
base/helpwiki/ansible/roles/helpwiki/files/LeverForChange_Logo.png

6.98 KiB

---
- name: Transfer LFC Logo
copy:
src: LeverForChange_Logo.png
dest: "{{ mediawiki_install_directory }}/mediawiki-{{ mediawiki_version }}/resources/assets/LeverForChange_Logo.png"
- name: Install LFC Logo
lineinfile:
path: "{{ mediawiki_install_directory }}/mediawiki-{{ mediawiki_version }}/LocalSettings.php"
regexp: ^\$wgLogos = .*
line: $wgLogos = [ '1x' => "$wgResourceBasePath/resources/assets/LeverForChange_Logo.png" ];
- name: Public Permissions
blockinfile:
marker: "## {mark} HELP WIKI PERMISSIONS"
path: "{{ mediawiki_install_directory }}/mediawiki-{{ mediawiki_version }}/LocalSettings.php"
block: |
$wgGroupPermissions['*']['read'] = true;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['user']['edit'] = true;
$wgPluggableAuth_EnableAutoLogin = false;
$wgPluggableAuth_EnableLocalLogin = false;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment