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,20 +77,22 @@
#async: 900
#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:
dest: "{{ service_filelist }}"
section: calibre
option: "{{ item.option }}"
value: "{{ item.value }}"
with_items:
- option: description
value: '"Calibre is an extremely popular personal library system for e-books."'
- option: url
value: "{{ calibre_src_url }}"
- option: database
value: "{{ calibre_dbpath }}"
- option: port
value: "{{ calibre_port }}"
- option: enabled
value: "{{ calibre_enabled }}"
- option: name
value: Calibre
- option: description
value: '"Calibre is an extremely popular personal library system for e-books."'
- option: url
value: "{{ calibre_src_url }}"
- option: database
value: "{{ calibre_dbpath }}"
- option: port
value: "{{ calibre_port }}"
- option: enabled
value: "{{ calibre_enabled }}"

View file

@ -34,25 +34,26 @@
- include_tasks: enable.yml
- name: Add 'kalite-serve' to service list
ini_file: dest='{{ service_filelist }}'
section=kalite
option='{{ item.option }}'
value='{{ item.value }}'
- name: Add 'kalite' to list of services at /etc/iiab/iiab.ini
ini_file:
dest: "{{ service_filelist }}"
section: kalite
option: "{{ item.option }}"
value: "{{ item.value }}"
with_items:
- option: name
value: kalite
- option: description
value: '"KA Lite is a server to present Khan Academy videos offline and to download them."'
- option: path
value: "{{ kalite_root }}"
- option: server_name
value: "{{ kalite_server_name }}"
- option: port
value: "{{ kalite_server_port }}"
- option: enabled
value: "{{ kalite_enabled }}"
- option: cron_enabled
value: "{{ kalite_cron_enabled }}"
- option: khan_assessment_install
value: "{{ khan_assessment_install }}"
- option: name
value: "KA Lite"
- option: description
value: '"KA Lite is a server to present Khan Academy videos offline and to download them."'
- option: path
value: "{{ kalite_root }}"
- option: server_name
value: "{{ kalite_server_name }}"
- option: port
value: "{{ kalite_server_port }}"
- option: enabled
value: "{{ kalite_enabled }}"
- option: cron_enabled
value: "{{ kalite_cron_enabled }}"
- option: khan_assessment_install
value: "{{ khan_assessment_install }}"

View file

@ -1,24 +1,28 @@
# 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"
# 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_i686: "kiwix-0.10-linux-i686.tar.bz2"
# Appears to be kiwix-0.9 from May 2014:
# kiwix_src_file_i686: "kiwix-linux-i686.tar.bz2"
kiwix_src_file_linux64: "kiwix-tools_linux64_2017-11-12.tar.gz"
kiwix_src_file_i686: "kiwix-0.10-linux-i686.tar.bz2" # Published Oct 2016 ("experimental")
# kiwix_src_file_i686: "kiwix-linux-i686.tar.bz2" # Published May 2014 ("use v0.9 to test legacy ZIM content")
# 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_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"
kiwix_library_xml: "{{ iiab_zim_path }}/library.xml"
# Unused: (Nov 2017)
kiwix_content_path: "{{ iiab_zim_path }}/content"
# Installation variables
# Installation Variables
kiwix_install: 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_first_pass: False

View file

@ -32,9 +32,9 @@
path: "{{ iiab_base }}/kiwix/bin/kiwix-serve"
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:
kiwix_first_pass: True
kiwix_force_install: True
when: kiwix_bin.stat.exists is defined and not kiwix_bin.stat.exists
- name: Copy test.zim file
@ -45,7 +45,7 @@
owner: root
group: root
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
@ -60,7 +60,7 @@
# dest: "{{ iiab_base }}"
owner: 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
file:
@ -73,7 +73,7 @@
# EXPERIMENTAL i686 CODE PATH
- 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/"
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)
unarchive:
@ -81,7 +81,7 @@
dest: "{{ iiab_base }}/kiwix/bin"
owner: 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:
# # workaround because unarchive does not set ownership properly

View file

@ -1,21 +1,27 @@
# EXPERIMENTAL i686 CODE PATH
- name: "Set Kiwix filename to d/l: {{ kiwix_src_file_i686 }} (i686)"
- name: "Set Kiwix filename to d/l: {{ kiwix_src_file_armhf }} (armv6l or armv71)"
set_fact:
kiwix_src_file: "{{ kiwix_src_file_i686 }}"
kiwix_src_bin_only: False
when: ansible_machine == "i686"
kiwix_src_file: "{{ kiwix_src_file_armhf }}"
kiwix_src_bin_only: True
when: ansible_machine == "armv7l" or ansible_machine == "armv6l"
- name: "Set Kiwix filename to d/l: {{ kiwix_src_file_linux64 }} (x86_64)"
set_fact:
kiwix_src_file: "{{ kiwix_src_file_linux64 }}"
kiwix_src_bin_only: True
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:
kiwix_src_file: "{{ kiwix_src_file_armhf }}"
kiwix_src_bin_only: True
when: ansible_machine == "armv7l" or ansible_machine == "armv6l"
kiwix_src_file: "{{ kiwix_src_file_i686 }}"
kiwix_src_bin_only: False
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
get_url:
@ -23,11 +29,16 @@
dest: "{{ downloads_dir }}/{{ kiwix_src_file }}"
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
when: kiwix_src_file is defined
tags:
- kiwix
- debug:
msg: "WARNING: kiwix-tools SOFTWARE NOT FOUND FOR YOUR OS/ARCHITECTURE."
when: not kiwix_src_file

View file

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

View file

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

View file

@ -137,17 +137,19 @@
service: name={{ apache_service }}
state=restarted
- name: Add OSM to service list
ini_file: dest='{{ service_filelist }}'
section=osm
option='{{ item.option }}'
value='{{ item.value }}'
- name: Add 'osm' to list of services at /etc/iiab/iiab.ini
ini_file:
dest: "{{ service_filelist }}"
section: osm
option: "{{ item.option }}"
value: "{{ item.value }}"
with_items:
- option: name
value: Internet-in-a-Box
- 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."'
- option: path
value: /osm
- option: enabled
value: "{{ osm_enabled }}"
- option: name
value: OpenStreetMap
- option: description
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
value: /osm
- option: enabled
value: "{{ osm_enabled }}"

View file

@ -64,18 +64,18 @@
state: absent
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:
dest: "{{ service_filelist }}"
section: phpmyadmin
option: "{{ item.option }}"
value: "{{ item.value }}"
with_items:
- option: name
value: phpMyAdmin
- option: description
value: '"phpMyAdmin is an interface with a MySQL database written in PHP, and available to administer the database engine locally or across the network."'
- option: path
value: /opt/phpmyadmin
- option: enabled
value: "{{ phpmyadmin_enabled }}"
- option: name
value: phpMyAdmin
- option: description
value: '"phpMyAdmin is an interface with a MySQL database written in PHP, and available to administer the database engine locally or across the network."'
- option: path
value: /opt/phpmyadmin
- option: enabled
value: "{{ phpmyadmin_enabled }}"

View file

@ -96,16 +96,16 @@
- { name: sugarizer }
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:
dest: "{{ service_filelist }}"
section: sugarizer
option: "{{ item.option }}"
value: "{{ item.value }}"
with_items:
- option: name
value: Sugarizer
- option: description
value: '"The Sugar Learning Platform began with the famous One Laptop Per Child project, written in Python. Sugarizer is the new HTML/JavaScript implementation of Sugar, usable in most all browsers."'
- option: enabled
value: "{{ sugarizer_enabled }}"
- option: name
value: Sugarizer
- option: description
value: '"The Sugar Learning Platform began with the famous One Laptop Per Child project, written in Python. Sugarizer is the new HTML/JavaScript implementation of Sugar, usable in most all browsers."'
- option: enabled
value: "{{ sugarizer_enabled }}"

View file

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