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

kalite/tasks/install.yml: basic cleanup of code & comments

This commit is contained in:
A Holt 2021-03-07 15:34:04 -05:00 committed by GitHub
parent b5d93b6fc7
commit 2c77593654
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,16 +14,15 @@
- name: Install python2, if Raspbian/Debian > 10 or Ubuntu > 19
package:
name:
- python2
- python-setuptools # provides setuptools-44 last version compatible with python2
- python2
- python-setuptools # provides setuptools-44 last version compatible with python2
state: present
when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19)
# 2020-03-31: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already.
- name: Use pip to pin setuptools to 44 in {{ kalite_venv }} if Raspbian/Debian > 10 or Ubuntu > 19
pip:
name:
- setuptools==44
name: setuptools==44
virtualenv: "{{ kalite_venv }}" # /usr/local/kalite/venv
virtualenv_site_packages: no
virtualenv_command: /usr/bin/virtualenv
@ -43,7 +42,7 @@
extra_args: "--no-cache-dir"
when: internet_available
- name: "Install from templates: venv wrapper /usr/bin/kalite, systemd unit file kalite-serve.service"
- name: "Install from templates: venv wrapper /usr/bin/kalite, unit file /etc/systemd/system/kalite-serve.service"
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
@ -52,7 +51,9 @@
- { src: 'kalite.sh.j2', dest: '/usr/bin/kalite', mode: '0755' }
- { src: 'kalite-serve.service.j2', dest: '/etc/systemd/system/kalite-serve.service', mode: '0644' }
- name: "Install from template: /etc/{{ apache_conf_dir }}/kalite.conf"
# Useless stanza, for 2 reasons: (1) http://box/kalite was never made to work
# (2) /etc/apache2/sites-available does not exist on many IIAB's w/o Apache
- name: "Install from template: /etc/{{ apache_conf_dir }}/kalite.conf (useless, as http://box/kalite was never made to work)"
template:
src: kalite.conf
dest: "/etc/{{ apache_conf_dir }}" # apache2/sites-available on debuntu
@ -73,7 +74,7 @@
replace: 'a-zA-Z0-9\-'
when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19)
# 2020-03-31: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already.
# JV why not just is_ubuntu_20?
# JV: why not just is_ubuntu_20? AH: to make this work on Ubuntu 21+ and ideally Debian 11+ too?
- name: Create dir {{ kalite_root }}
file: