mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
rename 'test_kalite_installed' add installed tracker
kalite move recording to enable and fixes
This commit is contained in:
parent
8ad02cd172
commit
493d97ff7e
3 changed files with 37 additions and 26 deletions
|
@ -37,3 +37,28 @@
|
||||||
enabled: no
|
enabled: no
|
||||||
state: stopped
|
state: stopped
|
||||||
when: not kalite_cron_enabled and is_F18
|
when: not kalite_cron_enabled and is_F18
|
||||||
|
|
||||||
|
- name: Add 'kalite_installed' variable values to {{ iiab_installed }}
|
||||||
|
ini_file:
|
||||||
|
path: "{{ iiab_installed }}"
|
||||||
|
value: kalite_installed
|
||||||
|
|
||||||
|
- name: Add 'kalite' variable values to {{ iiab_ini_file }}
|
||||||
|
ini_file:
|
||||||
|
path: "{{ iiab_ini_file }}"
|
||||||
|
section: kalite
|
||||||
|
option: "{{ item.option }}"
|
||||||
|
value: "{{ item.value }}"
|
||||||
|
with_items:
|
||||||
|
- option: name
|
||||||
|
value: "KA Lite"
|
||||||
|
- option: description
|
||||||
|
value: '"KA Lite downloads Khan Academy videos for offline use, with exercises and accounts if students want to track their own progress."'
|
||||||
|
- option: path
|
||||||
|
value: "{{ kalite_root }}"
|
||||||
|
- option: port
|
||||||
|
value: "{{ kalite_server_port }}"
|
||||||
|
- option: kalite_enabled
|
||||||
|
value: "{{ kalite_enabled }}"
|
||||||
|
- option: cron_enabled
|
||||||
|
value: "{{ kalite_cron_enabled }}"
|
||||||
|
|
|
@ -15,43 +15,24 @@
|
||||||
- name: Does KA Lite database {{ kalite_db_name }} exist? # See if KA Lite is already configured
|
- name: Does KA Lite database {{ kalite_db_name }} exist? # See if KA Lite is already configured
|
||||||
stat:
|
stat:
|
||||||
path: "{{ kalite_db_name }}"
|
path: "{{ kalite_db_name }}"
|
||||||
register: kalite_installed
|
register: test_kalite_installed
|
||||||
|
|
||||||
- include_tasks: install-f18.yml
|
- include_tasks: install-f18.yml
|
||||||
when: not kalite_installed.stat.exists and is_F18
|
when: not test_kalite_installed.stat.exists and is_F18 and kalite_install
|
||||||
|
|
||||||
- include_tasks: install.yml
|
- include_tasks: install.yml
|
||||||
when: kalite_installed is defined and not kalite_installed.stat.exists and not is_F18
|
when: test_kalite_installed is defined and not test_kalite_installed.stat.exists and not is_F18 and kalite_install
|
||||||
|
|
||||||
- name: Ask systemd to reread unit files (daemon-reload)
|
- name: Ask systemd to reread unit files (daemon-reload)
|
||||||
systemd:
|
systemd:
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
when: not kalite_installed.stat.exists
|
when: not test_kalite_installed.stat.exists
|
||||||
|
|
||||||
- include_tasks: setup-f18.yml
|
- include_tasks: setup-f18.yml
|
||||||
when: not kalite_installed.stat.exists and is_F18
|
when: not test_kalite_installed.stat.exists and is_F18
|
||||||
|
|
||||||
- include_tasks: setup.yml
|
- include_tasks: setup.yml
|
||||||
when: not kalite_installed.stat.exists and not is_F18
|
when: not test_kalite_installed.stat.exists and not is_F18
|
||||||
|
|
||||||
- include_tasks: enable.yml
|
- include_tasks: enable.yml
|
||||||
|
when: kalite_install or kalite_installed is defined
|
||||||
- name: Add 'kalite' variable values to {{ iiab_ini_file }}
|
|
||||||
ini_file:
|
|
||||||
path: "{{ iiab_ini_file }}"
|
|
||||||
section: kalite
|
|
||||||
option: "{{ item.option }}"
|
|
||||||
value: "{{ item.value }}"
|
|
||||||
with_items:
|
|
||||||
- option: name
|
|
||||||
value: "KA Lite"
|
|
||||||
- option: description
|
|
||||||
value: '"KA Lite downloads Khan Academy videos for offline use, with exercises and accounts if students want to track their own progress."'
|
|
||||||
- option: kalite_root
|
|
||||||
value: "{{ kalite_root }}"
|
|
||||||
- option: kalite_server_port
|
|
||||||
value: "{{ kalite_server_port }}"
|
|
||||||
- option: kalite_enabled
|
|
||||||
value: "{{ kalite_enabled }}"
|
|
||||||
- option: kalite_cron_enabled
|
|
||||||
value: "{{ kalite_cron_enabled }}"
|
|
||||||
|
|
|
@ -14,3 +14,8 @@
|
||||||
KALITE_HOME: "{{ kalite_root }}" # /library/ka-lite
|
KALITE_HOME: "{{ kalite_root }}" # /library/ka-lite
|
||||||
async: 1800
|
async: 1800
|
||||||
poll: 10
|
poll: 10
|
||||||
|
|
||||||
|
- name: Add 'kalite_installed' variable values to {{ iiab_installed }}
|
||||||
|
ini_file:
|
||||||
|
path: "{{ iiab_installed }}"
|
||||||
|
value: kalite_installed
|
||||||
|
|
Loading…
Reference in a new issue