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

Bug & cleanup of kiwix/tasks/install.yml

This commit is contained in:
A Holt 2020-01-11 19:09:29 -05:00 committed by GitHub
parent 9a436fd089
commit 736a20d78f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,9 +15,6 @@
- name: Create directory {{ iiab_zim_path }} and subdirs {content, index} for Kiwix ZIM files
file:
path: "{{ item }}"
# owner: root
# group: root
# mode: '0755'
state: directory
with_items:
- "{{ iiab_zim_path }}"
@ -33,9 +30,6 @@
template:
src: library.xml
dest: "{{ kiwix_library_xml }}"
# owner: root
# group: root
# mode: '0644'
force: no
when: not kiwix_xml.stat.exists
@ -43,17 +37,11 @@
copy:
src: test.zim
dest: "{{ iiab_zim_path }}/content/test.zim"
# owner: root
# group: root
# mode: '0644'
force: no
- name: Create {{ kiwix_path }}/bin directory # /opt/iiab/kiwix/bin
file:
path: "{{ kiwix_path }}/bin"
# owner: root
# group: root
# mode: '0755'
state: directory
# 2. INSTALL KIWIX-TOOLS EXECUTABLES
@ -62,8 +50,6 @@
unarchive:
src: "{{ downloads_dir }}/{{ kiwix_src_file }}"
dest: /tmp
# owner: root
# group: root
- name: Move /tmp/{{ kiwix_src_dir }}/* to permanent location /opt/iiab/kiwix/bin (armhf & linux64 & i686)
shell: "mv /tmp/{{ kiwix_src_dir }}/* {{ kiwix_path }}/bin/"
@ -88,18 +74,16 @@
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
# owner: root
# group: root
mode: "{{ item.mode }}"
with_items:
- { src: 'kiwix-serve.service.j2', dest: '/etc/systemd/system/kiwix-serve.service', mode: '0644'}
- { src: 'iiab-make-kiwix-lib', dest: '/usr/bin/iiab-make-kiwix-lib', mode: '0755'}
- { src: 'iiab-make-kiwix-lib3.py', dest: '/usr/bin/iiab-make-kiwix-lib.py', mode: '0755'}
- { src: 'kiwix.conf.j2', dest: '/etc/{{ apache_config_dir }}/kiwix.conf', mode: '0644'}
- { src: 'kiwix-serve.service.j2', dest: '/etc/systemd/system/kiwix-serve.service', mode: '0644' }
- { src: 'iiab-make-kiwix-lib', dest: '/usr/bin/iiab-make-kiwix-lib', mode: '0755' }
- { src: 'iiab-make-kiwix-lib3.py', dest: '/usr/bin/iiab-make-kiwix-lib.py', mode: '0755' }
- { src: 'kiwix.conf.j2', dest: '/etc/{{ apache_config_dir }}/kiwix.conf', mode: '0644' }
5. RECORD KIWIX AS INSTALLED IN /etc/iiab/iiab_state.yml
# 5. RECORD KIWIX AS INSTALLED IN /etc/iiab/iiab_state.yml
- name: Add 'kiwix_installed' variable values to {{ iiab_state_file }}
- name: Add 'kiwix_installed: True' to {{ iiab_state_file }}
lineinfile:
dest: "{{ iiab_state_file }}"
regexp: '^kiwix_installed'