1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Merge pull request #570 from holta/iiab.ini-clarifs

Clarifying what gets put into /etc/iiab/iiab.ini
This commit is contained in:
A Holt 2017-11-26 22:19:47 -05:00 committed by GitHub
commit 75436480a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 171 additions and 148 deletions

View file

@ -77,13 +77,15 @@
#async: 900 #async: 900
#poll: 5 #poll: 5
- name: Add 'calibre-serve' to service list at /etc/iiab/iiab.ini - name: Add 'calibre' to list of services at /etc/iiab/iiab.ini
ini_file: ini_file:
dest: "{{ service_filelist }}" dest: "{{ service_filelist }}"
section: calibre section: calibre
option: "{{ item.option }}" option: "{{ item.option }}"
value: "{{ item.value }}" value: "{{ item.value }}"
with_items: with_items:
- option: name
value: Calibre
- option: description - option: description
value: '"Calibre is an extremely popular personal library system for e-books."' value: '"Calibre is an extremely popular personal library system for e-books."'
- option: url - option: url

View file

@ -34,14 +34,15 @@
- include_tasks: enable.yml - include_tasks: enable.yml
- name: Add 'kalite-serve' to service list - name: Add 'kalite' to list of services at /etc/iiab/iiab.ini
ini_file: dest='{{ service_filelist }}' ini_file:
section=kalite dest: "{{ service_filelist }}"
option='{{ item.option }}' section: kalite
value='{{ item.value }}' option: "{{ item.option }}"
value: "{{ item.value }}"
with_items: with_items:
- option: name - option: name
value: kalite value: "KA Lite"
- option: description - option: description
value: '"KA Lite is a server to present Khan Academy videos offline and to download them."' value: '"KA Lite is a server to present Khan Academy videos offline and to download them."'
- option: path - option: path

View file

@ -1,24 +1,28 @@
# Which kiwix-tools to download from http://download.iiab.io/packages/ (origin: http://download.kiwix.org/nightly/) # Which kiwix-tools to download from http://download.iiab.io/packages/ (origin: http://download.kiwix.org/nightly/)
kiwix_src_file_linux64: "kiwix-tools_linux64_2017-11-12.tar.gz"
kiwix_src_file_armhf: "kiwix-tools_armhf_2017-11-12.tar.gz" kiwix_src_file_armhf: "kiwix-tools_armhf_2017-11-12.tar.gz"
# Experimental kiwix-0.10 from Oct 2016: (to be replaced before Feb 2018, SEE https://github.com/kiwix/kiwix-build/issues/94) kiwix_src_file_linux64: "kiwix-tools_linux64_2017-11-12.tar.gz"
kiwix_src_file_i686: "kiwix-0.10-linux-i686.tar.bz2" kiwix_src_file_i686: "kiwix-0.10-linux-i686.tar.bz2" # Published Oct 2016 ("experimental")
# Appears to be kiwix-0.9 from May 2014: # kiwix_src_file_i686: "kiwix-linux-i686.tar.bz2" # Published May 2014 ("use v0.9 to test legacy ZIM content")
# kiwix_src_file_i686: "kiwix-linux-i686.tar.bz2" # KIWIX FOR i686 SHOULD BE REPLACED BEFORE FEB 2018: https://github.com/kiwix/kiwix-build/issues/94
# The following 2 lines are unused as of Nov 2017: kiwix_port: 3000
# The following 2 lines are unused: (Nov 2017)
# kiwix_url: /kiwix # kiwix_url: /kiwix
# kiwix_path: "{{ iiab_base }}/kiwix" # kiwix_path: "{{ iiab_base }}/kiwix"
kiwix_port: 3000
# /library/zims contains 3 important things: {library.xml, content, index} # /library/zims contains 3 important things:
# - library.xml
# - content directory for all *.zim's
# - index directory for legacy *.zim.idx's
iiab_zim_path: "{{ content_base }}/zims" iiab_zim_path: "{{ content_base }}/zims"
kiwix_library_xml: "{{ iiab_zim_path }}/library.xml" kiwix_library_xml: "{{ iiab_zim_path }}/library.xml"
# Unused: (Nov 2017)
kiwix_content_path: "{{ iiab_zim_path }}/content" kiwix_content_path: "{{ iiab_zim_path }}/content"
# Installation variables # Installation Variables
kiwix_install: True kiwix_install: True
kiwix_enabled: True kiwix_enabled: True
# The following line is unused as of Nov 2017: # MOVE FILE /opt/iiab/kiwix/bin/kiwix-serve TO FORCE A REINSTALL OF kiwix-tools
kiwix_force_install: False
# Unused: (Nov 2017)
# kiwix_content_found: False # kiwix_content_found: False
kiwix_first_pass: False

View file

@ -32,9 +32,9 @@
path: "{{ iiab_base }}/kiwix/bin/kiwix-serve" path: "{{ iiab_base }}/kiwix/bin/kiwix-serve"
register: kiwix_bin register: kiwix_bin
- name: Set kiwix_first_pass if kiwix-serve not found - name: Set kiwix_force_install if kiwix-serve not found
set_fact: set_fact:
kiwix_first_pass: True kiwix_force_install: True
when: kiwix_bin.stat.exists is defined and not kiwix_bin.stat.exists when: kiwix_bin.stat.exists is defined and not kiwix_bin.stat.exists
- name: Copy test.zim file - name: Copy test.zim file
@ -45,7 +45,7 @@
owner: root owner: root
group: root group: root
force: no force: no
when: kiwix_first_pass when: kiwix_force_install
# We get a whole web server for i686 but only the kiwix execs for linux64 & armhf # We get a whole web server for i686 but only the kiwix execs for linux64 & armhf
@ -60,7 +60,7 @@
# dest: "{{ iiab_base }}" # dest: "{{ iiab_base }}"
owner: root owner: root
group: root group: root
when: not kiwix_src_bin_only and kiwix_first_pass when: not kiwix_src_bin_only and kiwix_force_install
- name: Create kiwix/bin directory - name: Create kiwix/bin directory
file: file:
@ -73,7 +73,7 @@
# EXPERIMENTAL i686 CODE PATH # EXPERIMENTAL i686 CODE PATH
- name: move /tmp/kiwix*i686/bin/* to permanent location /opt/iiab/kiwix/bin (not bin_only, i.e. i686) - name: move /tmp/kiwix*i686/bin/* to permanent location /opt/iiab/kiwix/bin (not bin_only, i.e. i686)
shell: "mv /tmp/kiwix*i686/bin/* /opt/iiab/kiwix/bin/" shell: "mv /tmp/kiwix*i686/bin/* /opt/iiab/kiwix/bin/"
when: not kiwix_src_bin_only and kiwix_first_pass when: not kiwix_src_bin_only and kiwix_force_install
- name: Unarchive Kiwix to permanent location (bin_only, i.e. not i686) - name: Unarchive Kiwix to permanent location (bin_only, i.e. not i686)
unarchive: unarchive:
@ -81,7 +81,7 @@
dest: "{{ iiab_base }}/kiwix/bin" dest: "{{ iiab_base }}/kiwix/bin"
owner: root owner: root
group: root group: root
when: kiwix_src_bin_only and kiwix_first_pass when: kiwix_src_bin_only and kiwix_force_install
# MIGHT BE RESTORED LATER FOR i686? Unused as of Nov 2017: # MIGHT BE RESTORED LATER FOR i686? Unused as of Nov 2017:
# # workaround because unarchive does not set ownership properly # # workaround because unarchive does not set ownership properly

View file

@ -1,9 +1,8 @@
# EXPERIMENTAL i686 CODE PATH - name: "Set Kiwix filename to d/l: {{ kiwix_src_file_armhf }} (armv6l or armv71)"
- name: "Set Kiwix filename to d/l: {{ kiwix_src_file_i686 }} (i686)"
set_fact: set_fact:
kiwix_src_file: "{{ kiwix_src_file_i686 }}" kiwix_src_file: "{{ kiwix_src_file_armhf }}"
kiwix_src_bin_only: False kiwix_src_bin_only: True
when: ansible_machine == "i686" when: ansible_machine == "armv7l" or ansible_machine == "armv6l"
- name: "Set Kiwix filename to d/l: {{ kiwix_src_file_linux64 }} (x86_64)" - name: "Set Kiwix filename to d/l: {{ kiwix_src_file_linux64 }} (x86_64)"
set_fact: set_fact:
@ -11,11 +10,18 @@
kiwix_src_bin_only: True kiwix_src_bin_only: True
when: ansible_machine == "x86_64" when: ansible_machine == "x86_64"
- name: "Set Kiwix filename to d/l: {{ kiwix_src_file_armhf }} (armv6l or armv71)" - name: "Set Kiwix filename to d/l: {{ kiwix_src_file_i686 }} (i686)"
set_fact: set_fact:
kiwix_src_file: "{{ kiwix_src_file_armhf }}" kiwix_src_file: "{{ kiwix_src_file_i686 }}"
kiwix_src_bin_only: True kiwix_src_bin_only: False
when: ansible_machine == "armv7l" or ansible_machine == "armv6l" when: ansible_machine == "i686"
# COMMENT OUT LINE ABOVE TO TEST i686 CODE PATH ON X86_64 (WORKS NOV 2017)
- name: FAIL (force Ansible to exit) IF kiwix-tools appears unavailable for OS/architecture
# debug:
fail:
msg: "WARNING: kiwix-tools SOFTWARE APPEARS UNAVAILABLE FOR YOUR {{ ansible_machine }} OS/ARCHITECTURE."
when: not kiwix_src_file
- name: Download Kiwix software to /opt/iiab/downloads - name: Download Kiwix software to /opt/iiab/downloads
get_url: get_url:
@ -23,11 +29,16 @@
dest: "{{ downloads_dir }}/{{ kiwix_src_file }}" dest: "{{ downloads_dir }}/{{ kiwix_src_file }}"
when: internet_available when: internet_available
- name: Check for /opt/iiab/downloads/{{ kiwix_src_file }}
stat:
path: "{{ downloads_dir }}/{{ kiwix_src_file }}"
register: kiwix_src
- name: FAIL (force Ansible to exit) IF /opt/iiab/downloads/{{ kiwix_src_file }} doesn't exist
fail:
msg: "{ downloads_dir }}/{{ kiwix_src_file }} is REQUIRED in order to install Kiwix."
when: not kiwix_src.stat.exists
- include_tasks: kiwix_install.yml - include_tasks: kiwix_install.yml
when: kiwix_src_file is defined
tags: tags:
- kiwix - kiwix
- debug:
msg: "WARNING: kiwix-tools SOFTWARE NOT FOUND FOR YOUR OS/ARCHITECTURE."
when: not kiwix_src_file

View file

@ -122,14 +122,15 @@
# following enables and disables # following enables and disables
- include_tasks: nextcloud_enabled.yml - include_tasks: nextcloud_enabled.yml
- name: Add 'nextcloud' to service list - name: Add 'nextcloud' to list of services at /etc/iiab/iiab.ini
ini_file: dest='{{ service_filelist }}' ini_file:
section=nextcloud dest: "{{ service_filelist }}"
option='{{ item.option }}' section: Nextcloud
value='{{ item.value }}' option: "{{ item.option }}"
value: "{{ item.value }}"
with_items: with_items:
- option: name - option: name
value: nextcloud value: Nextcloud
- option: description - option: description
value: '"NextCloud is a local server-based facility for sharing files, photos, contacts, calendars, etc."' value: '"NextCloud is a local server-based facility for sharing files, photos, contacts, calendars, etc."'
- option: path - option: path

View file

@ -102,14 +102,15 @@
when: not openvpn_enabled and not installing when: not openvpn_enabled and not installing
- name: Add OpenVPN to service list - name: Add 'openvpn' to list of services at /etc/iiab/iiab.ini
ini_file: dest='{{ service_filelist }}' ini_file:
section=openvpn dest: "{{ service_filelist }}"
option='{{ item.option }}' section: openvpn
value='{{ item.value }}' option: "{{ item.option }}"
value: "{{ item.value }}"
with_items: with_items:
- option: name - option: name
value: "openvpn" value: OpenVPN
- option: description - option: description
value: '"OpenVPN is a means of connecting to a server anywhere on the internet, via a middleman server."' value: '"OpenVPN is a means of connecting to a server anywhere on the internet, via a middleman server."'
- option: middleman_url - option: middleman_url

View file

@ -137,16 +137,18 @@
service: name={{ apache_service }} service: name={{ apache_service }}
state=restarted state=restarted
- name: Add OSM to service list - name: Add 'osm' to list of services at /etc/iiab/iiab.ini
ini_file: dest='{{ service_filelist }}' ini_file:
section=osm dest: "{{ service_filelist }}"
option='{{ item.option }}' section: osm
value='{{ item.value }}' option: "{{ item.option }}"
value: "{{ item.value }}"
with_items: with_items:
- option: name - option: name
value: Internet-in-a-Box value: OpenStreetMap
- option: description - option: description
value: '"The Internet-in-a-Box is a small, inexpensive device which provides essential Internet resources without any Internet connection. It provides a local copy of half a terabyte of the worlds Free information."' value: '"OpenStreetMap offers beautiful maps of the entire planet, continually created & updated by volunteers (much in the same way as Wikipedia) but for maps."'
# value: '"The Internet-in-a-Box is a small, inexpensive device which provides essential Internet resources without any Internet connection. It provides a local copy of half a terabyte of the worlds Free information."'
- option: path - option: path
value: /osm value: /osm
- option: enabled - option: enabled

View file

@ -64,7 +64,7 @@
state: absent state: absent
when: not phpmyadmin_enabled and is_debuntu when: not phpmyadmin_enabled and is_debuntu
- name: Add phpmyadmin to service list - name: Add 'phpmyadmin' to list of services at /etc/iiab/iiab.ini
ini_file: ini_file:
dest: "{{ service_filelist }}" dest: "{{ service_filelist }}"
section: phpmyadmin section: phpmyadmin

View file

@ -96,7 +96,7 @@
- { name: sugarizer } - { name: sugarizer }
when: not sugarizer_enabled when: not sugarizer_enabled
- name: Add 'sugarizer' to service list at /etc/iiab/iiab.ini - name: Add 'sugarizer' to list of services at /etc/iiab/iiab.ini
ini_file: ini_file:
dest: "{{ service_filelist }}" dest: "{{ service_filelist }}"
section: sugarizer section: sugarizer

View file

@ -123,14 +123,15 @@
- name: Restart Apache, so it picks up the new aliases - name: Restart Apache, so it picks up the new aliases
service: name={{ apache_service }} state=restarted service: name={{ apache_service }} state=restarted
- name: Add 'wordpress' to service list - name: Add 'wordpress' to list of services at /etc/iiab/iiab.ini
ini_file: dest='{{ service_filelist }}' ini_file:
section=wordpress dest: "{{ service_filelist }}"
option='{{ item.option }}' section: wordpress
value='{{ item.value }}' option: "{{ item.option }}"
value: "{{ item.value }}"
with_items: with_items:
- option: name - option: name
value: wordpress value: WordPress
- option: description - option: description
value: '"WordPress is a blog and web site management application."' value: '"WordPress is a blog and web site management application."'
- option: wordpress_src - option: wordpress_src