2019-10-20 21:04:56 +00:00
# For OS's other than Fedora 18
2019-10-20 21:31:09 +00:00
- name : Download {{ kalite_requirements }} to {{ pip_packages_dir }}/kalite.txt
2017-12-08 06:33:31 +00:00
get_url :
url : "{{ kalite_requirements }}"
2019-10-20 21:04:56 +00:00
dest : "{{ pip_packages_dir }}/kalite.txt" # /opt/iiab/pip-packages/kalite.txt
2017-12-08 06:33:31 +00:00
timeout : "{{ download_timeout }}"
2019-05-24 22:33:10 +00:00
when : internet_available | bool
2017-09-17 18:07:34 +00:00
2020-01-19 14:08:02 +00:00
# 2020-01-19: https://github.com/piwheels/packages/issues/74 says the following is not longer needed...
#- name: Run 'mv /etc/pip.conf /etc/pip.conf.see-iiab-issue-2139' as "TEMPORARY" workaround (2020-01-17) for piwheels.org's setuptools Python 2/3 brokenness on RPi (https://github.com/iiab/iiab/issues/2139)
# command: mv /etc/pip.conf /etc/pip.conf.see-iiab-issue-2139
# ignore_errors: yes
# when: is_rpi | bool
2020-01-17 16:23:47 +00:00
2017-11-08 18:46:06 +00:00
#- name: Install KA Lite non-static + reqs file with pip - (debuntu)
2017-11-08 01:07:52 +00:00
# pip: requirements={{ pip_packages_dir }}/kalite.txt
# virtualenv={{ kalite_venv }}
# virtualenv_site_packages=no
# extra_args="--no-cache-dir"
2017-09-28 04:35:19 +00:00
# extra_args="--disable-pip-version-check"
2017-11-08 01:07:52 +00:00
# when: internet_available and is_debuntu
2017-09-17 18:07:34 +00:00
2019-10-20 21:46:53 +00:00
- name : Install KA Lite static to {{ kalite_venv }}, using pip (debuntu)
2017-12-08 06:33:31 +00:00
pip :
name : ka-lite-static
version : "{{ kalite_version }}"
virtualenv : "{{ kalite_venv }}"
virtualenv_site_packages : no
2019-10-31 14:11:30 +00:00
virtualenv_command : /usr/bin/virtualenv
virtualenv_python : python2.7
2017-12-08 06:33:31 +00:00
extra_args : "--no-cache-dir"
2017-09-28 04:35:19 +00:00
# extra_args="--disable-pip-version-check"
2017-10-19 00:54:28 +00:00
when : internet_available and is_debuntu
2018-07-09 18:35:17 +00:00
#- name: Install KA Lite non-static + reqs file with pip (OS's other than debuntu)
2017-11-08 01:07:52 +00:00
# pip: requirements={{ pip_packages_dir }}/kalite.txt
# virtualenv={{ kalite_venv }}
# virtualenv_site_packages=no
2017-10-19 00:54:28 +00:00
# extra_args="--no-cache-dir"
# extra_args="--disable-pip-version-check"
2017-11-08 01:07:52 +00:00
# when: internet_available and not is_debuntu
2017-10-19 00:54:28 +00:00
2019-10-20 21:46:53 +00:00
- name : Install KA Lite static to {{ kalite_venv }}, using pip (OS's other than debuntu)
2017-12-08 06:33:31 +00:00
pip :
name : ka-lite-static
version : "{{ kalite_version }}"
virtualenv : "{{ kalite_venv }}"
virtualenv_site_packages : no
2019-10-31 14:11:30 +00:00
virtualenv_command : /usr/bin/virtualenv
virtualenv_python : python2.7
2017-10-19 00:54:28 +00:00
# extra_args="--no-cache-dir"
# extra_args="--disable-pip-version-check"
when : internet_available and not is_debuntu
2017-05-27 18:09:50 +00:00
2019-01-12 21:46:37 +00:00
# This effectively does nothing at all on Ubuntu & Raspbian, where libgeos-*
# pkgs are not installed FWIW. But it's included to safeguard us across all
# OS's, in case others OS's like Ubermix later appear. See #1382 for details.
# Removing pkgs libgeos-3.6.2 & libgeos-c1v5 fixed the situation on Ubermix!
- name : Remove libgeos-* pkgs, avoiding KA Lite Django failure on Ubermix
2019-01-12 21:14:47 +00:00
shell : apt -y remove "libgeos-*"
2019-10-20 21:04:56 +00:00
# 2019-10-20: For Fedora 18 legacy (XO laptops) specially
2017-11-05 06:01:26 +00:00
- name : Default is to have cronserve started with KA Lite
2017-05-27 18:09:50 +00:00
set_fact :
2017-12-08 06:33:31 +00:00
job_scheduler_stanza : ""
2017-05-27 18:09:50 +00:00
2017-09-19 03:33:20 +00:00
- name : Add --skip-job-scheduler to start if cronserve not enabled
2017-05-27 18:09:50 +00:00
set_fact :
2017-12-08 06:33:31 +00:00
job_scheduler_stanza : "--skip-job-scheduler "
2017-05-27 18:09:50 +00:00
when : not kalite_cron_enabled
2019-10-20 21:04:56 +00:00
- name : "Install from template: venv wrapper /usr/bin/kalite, systemd unit file kalite-serve.service, Apache's kalite.conf"
2017-12-08 06:33:31 +00:00
template :
backup : no
src : "{{ item.src }}"
dest : "{{ item.dest }}"
owner : root
group : root
mode : "{{ item.mode }}"
2017-05-27 18:09:50 +00:00
with_items :
2017-11-16 09:03:34 +00:00
- { src: 'kalite.sh.j2', dest: '/usr/bin/kalite', mode : '0755' }
2019-10-20 21:04:56 +00:00
- { src: 'kalite-serve.service.j2', dest: '/etc/systemd/system/kalite-serve.service', mode : '0644' }
2020-01-30 09:00:00 +00:00
- { src: 'kalite.conf', dest : '/etc/{{ apache_conf_dir }}' , mode : '0644' }
2019-06-13 18:25:09 +00:00
2019-06-22 15:24:26 +00:00
- name : Fix KA Lite bug in regex parsing ifconfig output, for @m-anish's network names that contain dashes
2019-06-13 18:25:09 +00:00
replace :
path : /usr/local/kalite/venv/local/lib/python2.7/site-packages/kalite/packages/dist/ifcfg/parser.py
regexp : 'a-zA-Z0-9'
replace : 'a-zA-Z0-9\-'
2020-01-12 22:06:24 +00:00
2020-01-30 09:00:00 +00:00
# RECORD KA Lite AS INSTALLED
# TO DO: move the last 2 stanzas from setup.yml so they live right here,
# as any action named "install.yml" should do exactly what it says (install!)