robertdebock.mediawiki

Ansible Role MediaWiki

This role helps you install and set up MediaWiki on your system.

GitHub GitLab Downloads Version
github gitlab downloads Version

Example Playbook

Here is an example to use this role, taken from molecule/default/converge.yml. It gets tested every time any change is made.

---
- name: Converge
  hosts: all
  become: true
  gather_facts: true

  roles:
    - role: robertdebock.mediawiki
      mediawiki_destination: /opt

Before running this, the machine needs to be set up. This is done in CI using molecule/default/prepare.yml:

---
- name: Prepare
  hosts: all
  become: true
  gather_facts: false

  roles:
    - role: robertdebock.bootstrap
    - role: robertdebock.core_dependencies
    - role: robertdebock.epel
    - role: robertdebock.python_pip
    - role: robertdebock.buildtools
    - role: robertdebock.openssl
      openssl_items:
        - name: apache-httpd
          common_name: "{{ ansible_fqdn }}"
    - role: robertdebock.httpd
    - role: robertdebock.php
    - role: robertdebock.mysql
      mysql_databases:
        - name: mediawiki
      mysql_users:
        - name: mediawiki
          password: m3d14w1k1
          priv: "mediawiki.*:ALL"

For a complete guide on using these roles, see this explanation.

Role Variables

The default variables can be found in defaults/main.yml:

---
# defaults for mediawiki

# Version to install.
mediawiki_major: 1
mediawiki_minor: 37
mediawiki_release: 1

mediawiki_version: "{{ mediawiki_major }}.{{ mediawiki_minor }}.{{ mediawiki_release }}"

# Installation path for mediawiki. Change this to your desired path:
mediawiki_destination: "{{ _mediawiki_destination[ansible_distribution] | default(_mediawiki_destination['default']) }}"

Requirements

You need the pip packages listed in requirements.txt.

State of Used Roles

The following roles help set up the system. You can use other methods if you want.

Requirement GitHub GitLab
robertdebock.bootstrap Build Status GitHub Build Status GitLab
robertdebock.buildtools Build Status GitHub Build Status GitLab
robertdebock.core_dependencies Build Status GitHub Build Status GitLab
robertdebock.epel Build Status GitHub Build Status GitLab
robertdebock.httpd Build Status GitHub Build Status GitLab
robertdebock.mysql Build Status GitHub Build Status GitLab
robertdebock.openssl Build Status GitHub Build Status GitLab
robertdebock.php Build Status GitHub Build Status GitLab
robertdebock.python_pip Build Status GitHub Build Status GitLab

Dependencies

Most roles require some setup. This is handled in molecule/default/prepare.yml. This role specifically depends on:

  • {'role': 'robertdebock.httpd'}

Context

This role is part of a larger set of compatible roles. For more details, check the documentation of these roles.

Here is a diagram of related roles: dependencies

Compatibility

This role has been verified on these container images:

container tags
Debian all
Fedora all
Ubuntu focal

You will need at least Ansible version 2.12; tests have been completed on:

  • The previous version.
  • The current version.
  • The development version.

If you encounter any issues, please report them on GitHub.

License

This project is licensed under the Apache-2.0 License.

Author Information

Created by robertdebock

If you appreciate the work, please consider sponsoring me.

Informazioni sul progetto

Install and configure mediawiki on your system.

Installa
ansible-galaxy install robertdebock.mediawiki
Licenza
apache-2.0
Download
970
Proprietario
I know my way around (Linux) infrastructure, have a passion for automation, Docker, Ansible, Molecule and ci/cd.