diff options
Diffstat (limited to 'roles/mediawiki/tasks')
-rw-r--r-- | roles/mediawiki/tasks/main.yml | 31 |
1 files changed, 31 insertions, 0 deletions
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 |