mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Update install.yml
This commit is contained in:
parent
0b6369c555
commit
f2d0f1ffa6
1 changed files with 11 additions and 12 deletions
|
@ -1,47 +1,46 @@
|
||||||
- name: Download DokuWiki software
|
- name: Download {{ iiab_download_url }}/{{ dokuwiki_version }}.tgz # iiab_download_url is http://download.iiab.io/packages
|
||||||
get_url:
|
get_url:
|
||||||
url: "{{ iiab_download_url }}/{{ dokuwiki_version }}.tgz"
|
url: "{{ iiab_download_url }}/{{ dokuwiki_version }}.tgz"
|
||||||
dest: "{{ downloads_dir }}/"
|
dest: "{{ downloads_dir }}/"
|
||||||
timeout: "{{ download_timeout }}"
|
timeout: "{{ download_timeout }}"
|
||||||
when: internet_available
|
when: internet_available
|
||||||
|
|
||||||
- name: Copy it to permanent location /library
|
- name: Unarchive (unpack) it to /library/{{ dokuwiki_version }}
|
||||||
unarchive:
|
unarchive:
|
||||||
src: "{{ downloads_dir }}/{{ dokuwiki_version }}.tgz"
|
src: "{{ downloads_dir }}/{{ dokuwiki_version }}.tgz"
|
||||||
dest: /library
|
dest: /library
|
||||||
creates: "/library/{{ dokuwiki_version }}/VERSION"
|
creates: "/library/{{ dokuwiki_version }}/VERSION"
|
||||||
|
|
||||||
- name: Symlink /library/{{ dokuwiki_version }} from /library/dokuwiki
|
- name: Symlink /library/dokuwiki to /library/{{ dokuwiki_version }}
|
||||||
#shell: if [ ! -d /library/dokuwiki ]; then ln -sf /library/{{ dokuwiki_version }} /library/dokuwiki; fi
|
#shell: if [ ! -d /library/dokuwiki ]; then ln -sf /library/{{ dokuwiki_version }} /library/dokuwiki; fi
|
||||||
#shell: ln -sf /library/{{ dokuwiki_version }} /library/dokuwiki
|
#shell: ln -sf /library/{{ dokuwiki_version }} /library/dokuwiki
|
||||||
#BOTH LINES ABOVE FAIL TO UPDATE LINK; Ansible approach below works
|
#BOTH LINES ABOVE FAIL TO UPDATE LINK; Ansible approach below works
|
||||||
file:
|
file:
|
||||||
path: /library/dokuwiki
|
|
||||||
src: /library/{{ dokuwiki_version }}
|
src: /library/{{ dokuwiki_version }}
|
||||||
|
path: /library/dokuwiki
|
||||||
state: link
|
state: link
|
||||||
force: yes
|
force: yes
|
||||||
|
|
||||||
- name: Install config file for DokuWiki in Apache
|
- name: Install /etc/{{ apache_config_dir }}/dokuwiki.conf from template, for DokuWiki's http://box/wiki
|
||||||
template:
|
template:
|
||||||
src: dokuwiki.conf.j2
|
src: dokuwiki.conf.j2
|
||||||
dest: "/etc/{{ apache_config_dir }}/dokuwiki.conf"
|
dest: "/etc/{{ apache_config_dir }}/dokuwiki.conf"
|
||||||
when: dokuwiki_enabled
|
when: dokuwiki_enabled
|
||||||
|
|
||||||
- name: Enable the DokuWiki (debuntu)
|
- name: Symlink /etc/apache2/sites-enabled/dokuwiki.conf to /etc/apache2/sites-available/dokuwiki.conf if dokuwiki_enabled (debuntu)
|
||||||
file:
|
file:
|
||||||
src: /etc/apache2/sites-available/dokuwiki.conf
|
src: /etc/apache2/sites-available/dokuwiki.conf
|
||||||
dest: /etc/apache2/sites-enabled/dokuwiki.conf
|
path: /etc/apache2/sites-enabled/dokuwiki.conf
|
||||||
state: link
|
state: link
|
||||||
when: dokuwiki_enabled and is_debuntu
|
when: dokuwiki_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Disable the DokuWiki (debuntu)
|
- name: Remove symlink /etc/apache2/sites-enabled/dokuwiki.conf if not dokuwiki_enabled (debuntu)
|
||||||
file:
|
file:
|
||||||
path: /etc/apache2/sites-enabled/dokuwiki.conf
|
path: /etc/apache2/sites-enabled/dokuwiki.conf
|
||||||
state: absent
|
state: absent
|
||||||
when: not dokuwiki_enabled and is_debuntu
|
when: not dokuwiki_enabled and is_debuntu
|
||||||
|
|
||||||
|
- name: Set /library/{{ dokuwiki_version }} owner to {{ apache_user }} and permissions to 0755 (recursively)
|
||||||
- name: Change permissions on engine directory so Apache can write
|
|
||||||
file:
|
file:
|
||||||
path: "/library/{{ dokuwiki_version }}"
|
path: "/library/{{ dokuwiki_version }}"
|
||||||
owner: "{{ apache_user }}"
|
owner: "{{ apache_user }}"
|
||||||
|
@ -49,7 +48,7 @@
|
||||||
state: directory
|
state: directory
|
||||||
recurse: yes
|
recurse: yes
|
||||||
|
|
||||||
- name: Restart Apache, so it picks up the new aliases
|
- name: Restart Apache ({{ apache_service }}) to enable/disable DokuWiki's http://box/wiki
|
||||||
service:
|
systemd:
|
||||||
name: "{{ apache_service }}"
|
name: "{{ apache_service }}"
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
Loading…
Add table
Reference in a new issue