1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00
iiab/roles/kalite/tasks/install.yml

86 lines
3.3 KiB
YAML
Raw Normal View History

# For OS's other than Fedora 18
2017-05-27 18:09:50 +00:00
2019-10-20 21:53:07 +00:00
- name: Install package python-virtualenv allowing KA Lite install into {{ kalite_venv }}
2017-12-08 06:33:31 +00:00
package:
name: python-virtualenv
2017-12-08 06:33:31 +00:00
state: present
2017-09-17 18:07:34 +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 }}"
dest: "{{ pip_packages_dir }}/kalite.txt" # /opt/iiab/pip-packages/kalite.txt
2017-12-08 06:33:31 +00:00
timeout: "{{ download_timeout }}"
when: internet_available | bool
2017-09-17 18:07:34 +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"
# 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
- 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
extra_args: "--no-cache-dir"
# 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
- 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
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: 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
- 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
- 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:
- { 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'}
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
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\-'