aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/mw-backend/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/mw-backend/tasks')
-rw-r--r--ansible/roles/mw-backend/tasks/main.yml48
1 files changed, 31 insertions, 17 deletions
diff --git a/ansible/roles/mw-backend/tasks/main.yml b/ansible/roles/mw-backend/tasks/main.yml
index e3a0264..69f056d 100644
--- a/ansible/roles/mw-backend/tasks/main.yml
+++ b/ansible/roles/mw-backend/tasks/main.yml
@@ -68,20 +68,34 @@
template:
src: etc/mediawiki/LocalSettings.php.j2
dest: /etc/mediawiki/LocalSettings.php
-# - name: directories
-# file:
-# state: directory
-# path: "{{ item }}"
-# owner: root
-# group: root
-# with_items:
-# - /opt/mediawiki
-# - /opt/mediawiki/images
-# - name: www-data owned directories
-# file:
-# state: directory
-# path: "{{ item }}"
-# owner: www-data
-# group: www-data
-# with_items:
-# - /opt/mediawiki/images/deleted
+
+- name: Semantic MediaWiki
+ tags:
+ - mw-backend
+ - smw
+ block:
+ - name: packages
+ apt:
+ name: "{{ item }}"
+ install_recommends: no
+ with_items:
+ - composer
+ - php-zip
+ - name: directories
+ file:
+ state: directory
+ path: "{{ item }}"
+ owner: root
+ group: root
+ with_items:
+ - /opt/mediawiki
+ - /opt/mediawiki/semantic-media-wiki
+ - name: composer config
+ copy:
+ src: opt/mediawiki/semantic-media-wiki/composer.json
+ dest: /opt/mediawiki/semantic-media-wiki/composer.json
+ - name: run composer
+ become_user: www-data
+ composer:
+ command: install
+ working_dir: /opt/mediawiki/semantic-media-wiki