forked from ISTI-ansible-roles/ansible-roles
33 lines
1.0 KiB
YAML
33 lines
1.0 KiB
YAML
|
---
|
||
|
- name: Install the php prerequisites
|
||
|
apt: name={{ item }} state=present
|
||
|
with_items: mw_php_prereq
|
||
|
tags: mediawiki
|
||
|
|
||
|
- name: Ensure that the download and install dirs exist
|
||
|
file: path={{ item }} state=directory
|
||
|
with_items:
|
||
|
- '{{ mw_download_dir }}'
|
||
|
- '{{ mw_install_dir }}'
|
||
|
tags: mediawiki
|
||
|
|
||
|
- name: Download the mediawiki tar file
|
||
|
get_url: url={{ mw_download_url }} dest={{ mw_download_dir }}
|
||
|
when: not mw_install_from_package
|
||
|
register: mw_download
|
||
|
tags: mediawiki
|
||
|
|
||
|
- name: Unpack the mediawiki tar file
|
||
|
unarchive: copy=no src={{ mw_download_dir }}/mediawiki-{{ mw_version }}.{{ mw_minor_minor }}.tar.gz dest={{ mw_install_dir }}
|
||
|
when: ( mw_download | changed )
|
||
|
tags: mediawiki
|
||
|
|
||
|
- name: Rename the mediawiki directory
|
||
|
command: mv {{ mw_install_dir }}/mediawiki-{{ mw_version }}.{{ mw_minor_minor }} {{ mw_install_dir }}/mediawiki
|
||
|
when: ( mw_download | changed )
|
||
|
tags: mediawiki
|
||
|
|
||
|
- name: Create the mediawiki conf dir
|
||
|
file: path={{ mw_conf_dir }} state=directory
|
||
|
tags: mediawiki
|