From 98676274a8be4b77071e61087125e5cf86bbf29c Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Tue, 16 Dec 2014 00:52:21 +0100 Subject: Add a draft version of the mediawiki role --- roles/mediawiki/tasks/main.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 roles/mediawiki/tasks/main.yml (limited to 'roles/mediawiki/tasks') diff --git a/roles/mediawiki/tasks/main.yml b/roles/mediawiki/tasks/main.yml new file mode 100644 index 0000000..2f52933 --- /dev/null +++ b/roles/mediawiki/tasks/main.yml @@ -0,0 +1,31 @@ +--- +- yum: name={{ item }} state=installed + with_items: + - php-fpm + - php-mysql + - php-gd + - php-xml + +- get_url: dest={{ cache_dir }}/{{ item }} url=https://releases.wikimedia.org/mediawiki/{{ version | regex_replace('^(\d+)\.(\d+).*$', '\\1.\\2') }}/{{ item }} + with_items: + - mediawiki-{{ version }}.tar.gz + - mediawiki-{{ version }}.tar.gz.sig + register: result + +# TODO verify the signature when downloaded + +- file: state=directory name=/var/www/mediawiki{{ item }} + with_items: + - / + - /cache + +- command: creates=/var/www/mediawiki/mediawiki-{{ version }} tar -x --owner=root --group=root -f {{ cache_dir }}/mediawiki-{{ version }}.tar.gz -C /var/www/mediawiki/ + +# TODO selinux path ? +- file: path=/var/www/mediawiki/mediawiki-{{ version }}/cache owner=apache state=directory + +- template: src=wiki.conf dest=/etc/httpd/conf.d/www.theopensourceway.org.conf.d/wiki.conf + notify: restart httpd + +# upload dir, SELinux +- file: state=directory path=/var/www/mediawiki_upload owner=apache -- cgit