2017-10-27 13:57:21 +00:00
|
|
|
- name: Get the DokuWiki software
|
2017-10-20 04:36:10 +00:00
|
|
|
get_url: url="{{ iiab_download_url }}/{{ dokuwiki_version }}.tgz" dest={{ downloads_dir }}/
|
2017-10-19 06:33:02 +00:00
|
|
|
when: internet_available
|
2017-05-27 18:09:50 +00:00
|
|
|
|
|
|
|
- name: Copy it to permanent location /library
|
2017-06-20 02:06:50 +00:00
|
|
|
unarchive: src={{ downloads_dir }}/{{ dokuwiki_version }}.tgz dest=/library creates=/library/{{ dokuwiki_version }}/VERSION
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2017-06-15 19:28:33 +00:00
|
|
|
- name: Symlink /library/dokuwiki* to /library/dokuwiki
|
2017-06-15 19:43:28 +00:00
|
|
|
shell: if [ ! -d /library/dokuwiki ]; then ln -sf /library/{{ dokuwiki_version }} /library/dokuwiki; fi
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2017-10-27 13:57:21 +00:00
|
|
|
- name: Install config file for DokuWiki in Apache
|
2017-05-27 18:09:50 +00:00
|
|
|
template: src=dokuwiki.conf.j2 dest=/etc/{{ apache_config_dir }}/dokuwiki.conf
|
|
|
|
when: dokuwiki_enabled
|
|
|
|
|
2017-10-27 13:57:21 +00:00
|
|
|
- name: Enable the DokuWiki
|
2017-05-27 18:09:50 +00:00
|
|
|
file: path=/etc/apache2/sites-enabled/dokuwiki.conf
|
|
|
|
src=/etc/apache2/sites-available/dokuwiki.conf
|
|
|
|
state=link
|
2017-05-27 23:10:45 +00:00
|
|
|
when: dokuwiki_enabled and is_debuntu
|
2017-10-19 06:33:02 +00:00
|
|
|
|
2017-10-27 13:57:21 +00:00
|
|
|
- name: Disable the DokuWiki
|
2017-05-27 18:09:50 +00:00
|
|
|
file: path=/etc/apache2/sites-enabled/dokuwiki.conf
|
|
|
|
state=absent
|
2017-05-27 23:10:45 +00:00
|
|
|
when: not dokuwiki_enabled and is_debuntu
|
2017-05-27 18:09:50 +00:00
|
|
|
|
|
|
|
|
2017-10-27 13:57:21 +00:00
|
|
|
- name: Change permissions on engine directory so Apache can write
|
2017-06-20 02:06:50 +00:00
|
|
|
file: path=/library/{{ dokuwiki_version }} owner={{ apache_user }} mode=0755 state=directory recurse=yes
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2017-10-27 13:57:21 +00:00
|
|
|
- name: Restart Apache, so it picks up the new aliases
|
2017-05-27 18:09:50 +00:00
|
|
|
service: name={{ apache_service }} state=restarted
|