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/main.yml

60 lines
1.7 KiB
YAML
Raw Normal View History

2017-05-27 18:09:50 +00:00
# Assessment logic removed 3/1/2017 TFM
# Assume all XOs are F18 and nothing else is
2017-11-05 06:10:13 +00:00
- name: Calc KA Lite db file name (Fedora 18)
2017-05-27 18:09:50 +00:00
set_fact:
kalite_db_name: "{{ kalite_root }}/kalite/database/data.sqlite"
when: is_F18
2017-11-05 06:10:13 +00:00
- name: Calc KA Lite db file name (OS's other than Fedora 18)
2017-05-27 18:09:50 +00:00
set_fact:
kalite_db_name: "{{ kalite_root }}/database/data.sqlite"
when: not is_F18
2017-11-05 06:10:13 +00:00
- name: See if KA Lite is already configured
2017-05-27 18:09:50 +00:00
stat: path="{{ kalite_db_name }}"
register: kalite_installed
2017-11-05 06:10:13 +00:00
- include_tasks: install-f18.yml
2017-05-27 18:09:50 +00:00
when: not kalite_installed.stat.exists and is_F18
2017-11-05 06:10:13 +00:00
- include_tasks: install.yml
2017-05-27 18:09:50 +00:00
when: kalite_installed is defined and not kalite_installed.stat.exists and not is_F18
2017-10-27 14:00:58 +00:00
- name: Ask systemd to reread the unit files
2017-05-27 18:09:50 +00:00
shell: systemctl daemon-reload
when: not kalite_installed.stat.exists
2017-11-05 06:10:13 +00:00
- include_tasks: setup-f18.yml
2017-05-27 18:09:50 +00:00
when: not kalite_installed.stat.exists and is_F18
2017-11-05 06:10:13 +00:00
- include_tasks: setup.yml
2017-05-27 18:09:50 +00:00
when: not kalite_installed.stat.exists and not is_F18
2017-11-05 06:10:13 +00:00
- include_tasks: enable.yml
2017-05-27 18:09:50 +00:00
2017-11-27 01:09:09 +00:00
- name: Add 'kalite' to list of services at /etc/iiab/iiab.ini
2017-11-27 01:21:04 +00:00
ini_file:
dest: "{{ service_filelist }}"
section: kalite
option: "{{ item.option }}"
value: "{{ item.value }}"
2017-05-27 18:09:50 +00:00
with_items:
2017-11-27 01:21:04 +00:00
- option: name
value: "KA Lite"
- option: description
value: '"KA Lite is a server to present Khan Academy videos offline and to download them."'
- option: path
value: "{{ kalite_root }}"
- option: server_name
value: "{{ kalite_server_name }}"
- option: port
value: "{{ kalite_server_port }}"
- option: enabled
value: "{{ kalite_enabled }}"
- option: cron_enabled
value: "{{ kalite_cron_enabled }}"
- option: khan_assessment_install
value: "{{ khan_assessment_install }}"