2017-05-27 18:09:50 +00:00
|
|
|
- name: Create various directories for rachel
|
|
|
|
file: path={{ item }}
|
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
mode=0755
|
|
|
|
state=directory
|
|
|
|
with_items:
|
|
|
|
- /library/rachel
|
|
|
|
|
|
|
|
- name: See if rachel content is installed
|
|
|
|
stat: path="{{ rachel_content_path }}/index.php"
|
|
|
|
register: rachel_content
|
|
|
|
|
|
|
|
- name: Set rachel_content_found to False
|
|
|
|
set_fact:
|
|
|
|
rachel_content_found: False
|
|
|
|
|
|
|
|
- name: Set rachel_content_found True if found
|
|
|
|
set_fact:
|
|
|
|
rachel_content_found: True
|
|
|
|
when: rachel_content.stat.exists == true
|
|
|
|
|
2017-10-31 03:55:24 +00:00
|
|
|
- include_tasks: rachel_enabled.yml
|
2017-05-27 18:09:50 +00:00
|
|
|
when: rachel_enabled and rachel_content_found
|
|
|
|
|
2018-10-31 04:52:49 +00:00
|
|
|
- name: Add 'rachel' variable values to {{ iiab_ini_file }}
|
|
|
|
ini_file:
|
|
|
|
path: "{{ iiab_ini_file }}"
|
|
|
|
section: rachel
|
|
|
|
option: "{{ item.option }}"
|
|
|
|
value: "{{ item.value }}"
|
2017-05-27 18:09:50 +00:00
|
|
|
with_items:
|
|
|
|
- option: name
|
|
|
|
value: rachel
|
|
|
|
- option: description
|
|
|
|
value: '"Educational resources, packaged together for download and distribution in places without internet."'
|
|
|
|
- option: rachel_content_path
|
|
|
|
value: "{{ rachel_content_path }}"
|
|
|
|
- option: rachel_version
|
|
|
|
value: "{{ rachel_version }}"
|
|
|
|
- option: rachel_mysqldb_path
|
|
|
|
value: "{{ rachel_mysqldb_path }}"
|
|
|
|
- option: rachel_src_url
|
|
|
|
value: "{{ rachel_src_url }}"
|
|
|
|
- option: content_found
|
|
|
|
value: "{{ rachel_content_found }}"
|
|
|
|
- option: enabled
|
|
|
|
value: "{{ rachel_enabled }}"
|