Getting started

By default DokuWiki is installed on a separate system account "dokuwiki", in /srv/www/dokuwiki/ subdirectory and will be accessible on https://wiki.<domain>/. debops.nginx and debops.php roles are used to configure the required environment.

Example inventory

You can install DokuWiki on a host by adding it to [debops_service_dokuwiki] group in your Ansible inventory:

[debops_service_dokuwiki]
hostname

Example playbook

Here's an example playbook which uses debops.dokuwiki role to install DokuWiki:

---

- name: Manage DokuWiki installation
  hosts: [ 'debops_service_dokuwiki' ]
  become: True

  environment: '{{ inventory__environment | d({})
                   | combine(inventory__group_environment | d({}))
                   | combine(inventory__host_environment  | d({})) }}'

  roles:

    - role: debops.php/env
      tags: [ 'role::php', 'role::logrotate' ]

    - role: debops.logrotate
      tags: [ 'role::logrotate' ]
      logrotate__dependent_config:
        - '{{ php__logrotate__dependent_config }}'

    - role: debops.php
      tags: [ 'role::php' ]
      php__dependent_packages:
        - '{{ dokuwiki__php__dependent_packages }}'
      php__dependent_pools:
        - '{{ dokuwiki__php__dependent_pools }}'

    - role: debops.apt_preferences
      tags: [ 'role::apt_preferences' ]
      apt_preferences__dependent_list:
        - '{{ nginx__apt_preferences__dependent_list }}'

    - role: debops.ferm
      tags: [ 'role::ferm' ]
      ferm__dependent_rules:
        - '{{ nginx__ferm__dependent_rules }}'

    - role: debops.nginx
      tags: [ 'role::nginx' ]
      nginx__dependent_upstreams:
        - '{{ dokuwiki__nginx__dependent_upstreams }}'
      nginx__dependent_servers:
        - '{{ dokuwiki__nginx__dependent_servers }}'

    - role: debops.dokuwiki
      tags: [ 'role::dokuwiki' ]

Post-install steps

When Ansible is finished, you need to finish the configuration by opening the https://wiki.<domain>/install.php page. There you will be able to set the name of your new wiki, superuser account and password, and other settings.

You can then login to your wiki and configure it using the administrative interface.

Some of the provided plugins, for example CodeMirror, might not be installed correctly. In that case, reinstalling them using the admin interface should be enough to correctly enable them in DokuWiki.