---
- name: Import some initial wiki content
  shell: >
    php {{ mw_dir }}/maintenance/importDump.php /vagrant/roles/rdfio/files/wiki_content.xml
- name: Check out the WikiObjectModel extension
  git:
    repo=https://github.com/wikimedia/mediawiki-extensions-WikiObjectModel.git
    dest={{ mw_dir }}/extensions/WikiObjectModel
- name: Activate WikiObjectModel in MediaWiki settings file
  lineinfile:
    line='include_once("$IP/extensions/WikiObjectModel/WikiObjectModel.php");'
    dest={{ mw_dir }}/LocalSettings.php
    state=present
- name: Install ARC2
  composer:
    command=require
    arguments="semsol/arc2 v2.2.4 --update-no-dev"
    working_dir={{ mw_dir }}
- name: Check out the RDFIO (Until fixed in main repo, need to use a hotfix-branch)
  git:
    repo=https://github.com/samuell/RDFIO.git
    dest={{ mw_dir }}/extensions/RDFIO
    version=pr-remove-legacy-arc2-location
- name: Activate RDFIO in MediaWiki settings file
  lineinfile:
    line='include_once("$IP/extensions/RDFIO/RDFIO.php");'
    dest={{ mw_dir }}/LocalSettings.php
    state=present
- name: Activate full OWL export, as needed by RDFIO
  lineinfile:
    line='$smwgOWLFullExport = true;'
    dest={{ mw_dir }}/LocalSettings.php
    state=present
- name: Change user & group for wiki folder
  file:
    path=/var/www/html/w
    owner=www-data
    group=www-data
    recurse=yes
- name: Inform about manual steps needed to complete installation
  debug: "msg='MANUAL STEPS NEEDED TO COMPLETE INSTALLATION: 1. Visit this page on the wiki: http://localhost:8080/w/index.php/Special:RDFIOAdmin, 2. Login with 'Admin' and 'changethis' 3. Click the Setup button.'"

---
- name: Import some initial wiki content
  shell: >
    php {{ mw_dir }}/maintenance/importDump.php /vagrant/roles/rdfio/files/wiki_content.xml
- name: Install RDFIO including dependencies via composer
  composer:
    command=require
    arguments="rdfio/rdfio"
    working_dir={{ mw_dir }}
- name: Activate full OWL export, as needed by RDFIO
  lineinfile:
    line='$smwgOWLFullExport = true;'
    dest={{ mw_dir }}/LocalSettings.php
    state=present
- name: Change user & group for wiki folder
  file:
    path=/var/www/html/w
    owner=www-data
    group=www-data
    recurse=yes
- name: Inform about manual steps needed to complete installation
  debug: "msg='MANUAL STEPS NEEDED TO COMPLETE INSTALLATION: 1. Visit this page on the wiki: http://localhost:8080/w/index.php/Special:RDFIOAdmin, 2. Login with 'Admin' and 'changethis' 3. Click the Setup button.'"

Install RDFIO via composer/packagist.org instead of manually
Install RDFIO via composer/packagist.org instead of manually
