1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-15 04:32:11 +00:00
iiab/roles/dokuwiki/tasks/install.yml

56 lines
1.6 KiB
YAML
Raw Normal View History

2017-12-08 06:51:28 +00:00
- name: Download DokuWiki software
2017-12-08 05:40:41 +00:00
get_url:
url: "{{ iiab_download_url }}/{{ dokuwiki_version }}.tgz"
dest: "{{ downloads_dir }}/"
timeout: "{{ download_timeout }}"
when: internet_available
2017-05-27 18:09:50 +00:00
- name: Copy it to permanent location /library
2017-12-08 05:40:41 +00:00
unarchive:
src: "{{ downloads_dir }}/{{ dokuwiki_version }}.tgz"
dest: /library
creates: "/library/{{ dokuwiki_version }}/VERSION"
2017-05-27 18:09:50 +00:00
- name: Symlink /library/{{ dokuwiki_version }} from /library/dokuwiki
#shell: if [ ! -d /library/dokuwiki ]; then ln -sf /library/{{ dokuwiki_version }} /library/dokuwiki; fi
#shell: ln -sf /library/{{ dokuwiki_version }} /library/dokuwiki
#BOTH LINES ABOVE FAIL TO UPDATE LINK; Ansible approach below works
file:
path: /library/dokuwiki
src: /library/{{ dokuwiki_version }}
state: link
force: yes
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-12-08 05:40:41 +00:00
template:
src: dokuwiki.conf.j2
dest: "/etc/{{ apache_config_dir }}/dokuwiki.conf"
2017-05-27 18:09:50 +00:00
when: dokuwiki_enabled
2017-12-08 05:40:41 +00:00
- name: Enable the DokuWiki (debuntu)
file:
src: /etc/apache2/sites-available/dokuwiki.conf
dest: /etc/apache2/sites-enabled/dokuwiki.conf
state: link
2017-05-27 23:10:45 +00:00
when: dokuwiki_enabled and is_debuntu
2017-12-08 05:40:41 +00:00
- name: Disable the DokuWiki (debuntu)
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-12-08 05:40:41 +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-12-08 05:40:41 +00:00
service:
name: "{{ apache_service }}"
state: restarted