mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
85 lines
3.3 KiB
YAML
85 lines
3.3 KiB
YAML
# For OS's other than Fedora 18
|
|
|
|
- name: Install package python-virtualenv required for KA Lite startup
|
|
package:
|
|
name: python-virtualenv
|
|
state: present
|
|
|
|
- name: Download {{ kalite_requirements }} to {{ pip_packages_dir }}/kalite.txt
|
|
get_url:
|
|
url: "{{ kalite_requirements }}"
|
|
dest: "{{ pip_packages_dir }}/kalite.txt" # /opt/iiab/pip-packages/kalite.txt
|
|
timeout: "{{ download_timeout }}"
|
|
when: internet_available | bool
|
|
|
|
#- name: Install KA Lite non-static + reqs file with pip - (debuntu)
|
|
# pip: requirements={{ pip_packages_dir }}/kalite.txt
|
|
# virtualenv={{ kalite_venv }}
|
|
# virtualenv_site_packages=no
|
|
# extra_args="--no-cache-dir"
|
|
# extra_args="--disable-pip-version-check"
|
|
# when: internet_available and is_debuntu
|
|
|
|
- name: Install KA Lite static to {{ kalite_venv }}, using pip (debuntu)
|
|
pip:
|
|
name: ka-lite-static
|
|
version: "{{ kalite_version }}"
|
|
virtualenv: "{{ kalite_venv }}"
|
|
virtualenv_site_packages: no
|
|
extra_args: "--no-cache-dir"
|
|
# extra_args="--disable-pip-version-check"
|
|
when: internet_available and is_debuntu
|
|
|
|
#- name: Install KA Lite non-static + reqs file with pip (OS's other than debuntu)
|
|
# pip: requirements={{ pip_packages_dir }}/kalite.txt
|
|
# virtualenv={{ kalite_venv }}
|
|
# virtualenv_site_packages=no
|
|
# extra_args="--no-cache-dir"
|
|
# extra_args="--disable-pip-version-check"
|
|
# when: internet_available and not is_debuntu
|
|
|
|
- name: Install KA Lite static to {{ kalite_venv }}, using pip (OS's other than debuntu)
|
|
pip:
|
|
name: ka-lite-static
|
|
version: "{{ kalite_version }}"
|
|
virtualenv: "{{ kalite_venv }}"
|
|
virtualenv_site_packages: no
|
|
# extra_args="--no-cache-dir"
|
|
# extra_args="--disable-pip-version-check"
|
|
when: internet_available and not is_debuntu
|
|
|
|
# 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
|
|
shell: apt -y remove "libgeos-*"
|
|
|
|
# 2019-10-20: For Fedora 18 legacy (XO laptops) specially
|
|
- name: Default is to have cronserve started with KA Lite
|
|
set_fact:
|
|
job_scheduler_stanza: ""
|
|
|
|
- name: Add --skip-job-scheduler to start if cronserve not enabled
|
|
set_fact:
|
|
job_scheduler_stanza: "--skip-job-scheduler "
|
|
when: not kalite_cron_enabled
|
|
|
|
- name: "Install from template: venv wrapper /usr/bin/kalite, systemd unit file kalite-serve.service, Apache's kalite.conf"
|
|
template:
|
|
backup: no
|
|
src: "{{ item.src }}"
|
|
dest: "{{ item.dest }}"
|
|
owner: root
|
|
group: root
|
|
mode: "{{ item.mode }}"
|
|
with_items:
|
|
- { src: 'kalite.sh.j2', dest: '/usr/bin/kalite', mode: '0755'}
|
|
- { src: 'kalite-serve.service.j2', dest: '/etc/systemd/system/kalite-serve.service', mode: '0644'}
|
|
- { src: 'kalite.conf', dest: '/etc/{{ apache_config_dir }}', mode: '0644'}
|
|
|
|
- name: Fix KA Lite bug in regex parsing ifconfig output, for @m-anish's network names that contain dashes
|
|
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\-'
|