---
- hosts:
    - mw
  vars_files:
    - secrets.yml
  roles:
    - timezone
    - lusers
    - superusers
    - role: apache
      apache__template_prefix: mw/
      apache__template: mw/sites-enabled/000-default.conf
    - role: mediawiki
      mediawiki__local_settings: mw/LocalSettings.php
      mediawiki__wgDBserver: "10.0.3.1"
      mediawiki__wgDBname: "mediawiki"
      mediawiki__wgDBuser: "mediawiki"
      mediawiki__wgDBpassword: "{{ mediawiki_secrets.mediawiki_password }}"
      mediawiki__wgSecretKey: "{{ mediawiki_secrets.secret_key }}"
      mediawiki__wgUpgradeKey: "{{ mediawiki_secrets.upgrade_key }}"

  tasks:
    - name: unix-machine
      import_role: name=unix-machine
      tags: unix-machine

    - name: lxc-machine
      import_role: name=lxc-machine
      tags: lxc-machine

#    - name: mw-backend
#      include_role: name=mw-backend
#      tags: mw-backend