1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/rachel/tasks/main.yml

47 lines
1.4 KiB
YAML

- 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
- include_tasks: rachel_enabled.yml
when: rachel_enabled and rachel_content_found
- name: Add rachel to service list
ini_file: dest='{{ service_filelist }}'
section=rachel
option='{{ item.option }}'
value='{{ item.value }}'
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 }}"