1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/0-DEPRECATED-ROLES/dokuwiki/tasks/install.yml

55 lines
2.2 KiB
YAML
Raw Normal View History

2018-11-02 20:12:28 +00:00
- name: Download {{ iiab_download_url }}/{{ dokuwiki_version }}.tgz # iiab_download_url is http://download.iiab.io/packages
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 | bool
2017-05-27 18:09:50 +00:00
2018-11-02 20:12:28 +00:00
- name: Unarchive (unpack) it to /library/{{ dokuwiki_version }}
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: Ensure dir /library/{{ dokuwiki_version }} is owned by {{ apache_user }} with 644/755 permissions
file:
path: "/library/{{ dokuwiki_version }}"
owner: "{{ apache_user }}"
mode: u+rw,go+r,go-w # '0755' had forced 'x' bits for non-dirs
state: directory
recurse: yes
- name: Symlink /library/dokuwiki -> /library/{{ dokuwiki_version }}
#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:
src: /library/{{ dokuwiki_version }}
2018-11-02 20:12:28 +00:00
path: /library/dokuwiki
state: link
force: yes
2017-05-27 18:09:50 +00:00
2020-01-30 09:00:00 +00:00
- name: Install /etc/{{ apache_conf_dir }}/dokuwiki.conf from template, for DokuWiki's http://box{{ dokuwiki_url }}
2017-12-08 05:40:41 +00:00
template:
src: dokuwiki.conf.j2
2020-01-30 09:00:00 +00:00
dest: "/etc/{{ apache_conf_dir }}/dokuwiki.conf"
2017-05-27 18:09:50 +00:00
# - name: Symlink /etc/apache2/sites-enabled/dokuwiki.conf to /etc/apache2/sites-available/dokuwiki.conf if dokuwiki_enabled (debuntu)
# file:
# src: /etc/apache2/sites-available/dokuwiki.conf
# path: /etc/apache2/sites-enabled/dokuwiki.conf
# state: link
# when: dokuwiki_enabled and is_debuntu
#
# - name: Remove symlink /etc/apache2/sites-enabled/dokuwiki.conf if not dokuwiki_enabled (debuntu)
# file:
# path: /etc/apache2/sites-enabled/dokuwiki.conf
# state: absent
# when: not dokuwiki_enabled and is_debuntu
2017-05-27 18:09:50 +00:00
- name: "Add 'dokuwiki_installed: True' to {{ iiab_state_file }}"
2019-09-14 22:38:55 +00:00
lineinfile:
dest: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
2019-09-14 22:38:55 +00:00
regexp: '^dokuwiki_installed'
2019-10-07 17:11:21 +00:00
line: 'dokuwiki_installed: True'