mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 19:52:06 +00:00
57 lines
1.7 KiB
YAML
57 lines
1.7 KiB
YAML
# Assessment logic removed 3/1/2017 TFM
|
|
|
|
# Assume all XOs are F18 and nothing else is
|
|
|
|
- name: Set KA Lite's SQLite filename (Fedora 18)
|
|
set_fact:
|
|
kalite_db_name: "{{ kalite_root }}/kalite/database/data.sqlite"
|
|
when: is_F18 | bool
|
|
|
|
- name: Set KA Lite's SQLite filename (OS's other than Fedora 18)
|
|
set_fact:
|
|
kalite_db_name: "{{ kalite_root }}/database/data.sqlite"
|
|
when: not is_F18
|
|
|
|
- name: Does KA Lite database {{ kalite_db_name }} exist? # See if KA Lite is already configured
|
|
stat:
|
|
path: "{{ kalite_db_name }}"
|
|
register: kalite_installed
|
|
|
|
- include_tasks: install-f18.yml
|
|
when: not kalite_installed.stat.exists and is_F18
|
|
|
|
- include_tasks: install.yml
|
|
when: kalite_installed is defined and not kalite_installed.stat.exists and not is_F18
|
|
|
|
- name: Ask systemd to reread unit files (daemon-reload)
|
|
systemd:
|
|
daemon_reload: yes
|
|
when: not kalite_installed.stat.exists
|
|
|
|
- include_tasks: setup-f18.yml
|
|
when: not kalite_installed.stat.exists and is_F18
|
|
|
|
- include_tasks: setup.yml
|
|
when: not kalite_installed.stat.exists and not is_F18
|
|
|
|
- include_tasks: enable.yml
|
|
|
|
- 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 }}"
|