diff options
Diffstat (limited to 'ansible')
-rw-r--r-- | ansible/host_vars/mw/mediawiki.yml | 3 | ||||
-rw-r--r-- | ansible/roles/mediawiki-database/tasks/main.yml | 37 | ||||
-rw-r--r-- | ansible/templates/mw/LocalSettings.php | 15 |
3 files changed, 55 insertions, 0 deletions
diff --git a/ansible/host_vars/mw/mediawiki.yml b/ansible/host_vars/mw/mediawiki.yml index cbf416f..4dc7df4 100644 --- a/ansible/host_vars/mw/mediawiki.yml +++ b/ansible/host_vars/mw/mediawiki.yml @@ -19,3 +19,6 @@ mediawiki__extensions: - repo: https://github.com/wikimedia/mediawiki-extensions-CodeEditor dest: CodeEditor version: REL1_31 + - repo: https://github.com/wikimedia/mediawiki-extensions-WikiEditor + dest: WikiEditor + version: REL1_31 diff --git a/ansible/roles/mediawiki-database/tasks/main.yml b/ansible/roles/mediawiki-database/tasks/main.yml new file mode 100644 index 0000000..8680830 --- /dev/null +++ b/ansible/roles/mediawiki-database/tasks/main.yml @@ -0,0 +1,37 @@ +- tags: + - mediawiki-database + - packages + become: yes + block: + - name: packages + become: + with_items: + - python-psycopg2 # required for the next block + apt: + name: "{{ item }}" + install_recommends: no + +- tags: mediawiki-database + become: yes + become_user: postgres + vars: + ansible_ssh_pipelining: true + block: + - name: pg user mediawiki + tags: update-password + postgresql_user: + name: "{{ credentials.username }}" + password: "{{ credentials.password }}" + encrypted: yes + - name: pg db mediawiki + postgresql_db: + name: "{{ credentials.database }}" + encoding: utf-8 + owner: "{{ credentials.username }}" + - postgresql_privs: + database: "{{ credentials.database }}" + state: present + privs: USAGE + type: schema + objs: public + roles: "{{ credentials.username }}" diff --git a/ansible/templates/mw/LocalSettings.php b/ansible/templates/mw/LocalSettings.php index 91ded62..bb113cc 100644 --- a/ansible/templates/mw/LocalSettings.php +++ b/ansible/templates/mw/LocalSettings.php @@ -116,6 +116,21 @@ $wgDefaultSkin = "vector"; wfLoadExtension( 'Scribunto' ); $wgScribuntoDefaultEngine = 'luastandalone'; +wfLoadExtension("SemanticScribunto"); +wfLoadExtension('WikiEditor'); +wfLoadExtension( 'CodeEditor' ); +# Enables link and table wizards by default but still allows users to +# disable them in preferences +$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1; + +# Displays the Preview and Changes tabs +$wgDefaultUserOptions['wikieditor-preview'] = 1; + +# Displays the Publish and Cancel buttons on the top right side +$wgDefaultUserOptions['wikieditor-publish'] = 1; + +$wgScribuntoUseCodeEditor = true; + wfLoadSkin( 'MonoBook' ); wfLoadSkin( 'Timeless' ); wfLoadSkin( 'Vector' ); |