Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move metadata to info dir in /library #438

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions roles/cmdsrv/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@
- utilities/iiab-install-oer2go-mod
- utilities/iiab-sync-menu-defs

- name: Copy default kiwix_catalog.json
- name: Copy default kiwix_catalog.json to {{ content_info }}/kiwix_catalog.json
copy: src="json/kiwix_catalog.json"
dest="/etc/iiab/kiwix_catalog.json"
dest="{{ content_info }}/kiwix_catalog.json"
mode=0644
force=no
owner=root
Expand All @@ -199,9 +199,9 @@

#- debug: var=kiwix_cat.stdout_lines

- name: Copy default oer2go_catalog.json
- name: Copy default oer2go_catalog.json to {{ content_info }}/oer2go_catalog.json
copy: src="json/oer2go_catalog.json"
dest="/etc/iiab/oer2go_catalog.json"
dest="{{ content_info }}/oer2go_catalog.json"
mode=0644
force=no
owner=root
Expand All @@ -211,20 +211,34 @@
# shell: "iiab-get-oer2go-cat"
# register: oer2go_cat

- name: Create symlink from /common/assets to kiwix_catalog.json
file: src=/etc/iiab/kiwix_catalog.json
- name: Create symlink from {{ doc_root }}/common/assets/kiwix_catalog.json -> {{ content_info }}/kiwix_catalog.json
file: src={{ content_info }}/kiwix_catalog.json
dest={{ doc_root }}/common/assets/kiwix_catalog.json
owner=root
group=root
state=link

- name: Create symlink from /common/assets to oer2go_catalog.json
file: src=/etc/iiab/oer2go_catalog.json
- name: Create symlink from {{ doc_root }}/common/assets/oer2go_catalog.json -> {{ content_info }}/oer2go_catalog.json
file: src={{ content_info }}/oer2go_catalog.json
dest={{ doc_root }}/common/assets/oer2go_catalog.json
owner=root
group=root
state=link

- name: Create symlink from {{ content_info }}/kiwix_catalog.json -> {{ iiab_etc_path }}/kiwix_catalog.json
file: src={{ content_info }}/kiwix_catalog.json
dest={{ iiab_etc_path }}/kiwix_catalog.json
owner=root
group=root
state=link

- name: Create symlink from {{ content_info }}/oer2go_catalog.json -> {{ iiab_etc_path }}/oer2go_catalog.json
file: src={{ content_info }}/oer2go_catalog.json
dest={{ iiab_etc_path }}/oer2go_catalog.json
owner=root
group=root
state=link

- name: Create cmdsrv.conf file
template: backup=yes
src=cmdsrv.conf.j2
Expand Down
6 changes: 3 additions & 3 deletions roles/cmdsrv/templates/cmdsrv.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
"cmdsrv_ready_file" : "{{ cmdsrv_ready_file }}",
"cmdsrv_lower_job_priority_flag" : {{ cmdsrv_lower_job_priority_flag }},
"cmdsrv_lower_job_priority_str" : "{{ cmdsrv_lower_job_priority_str }}",
"kiwix_catalog_file" : "{{ iiab_config_dir }}/kiwix_catalog.json",
"content_base" : "{{ content_base }}",
"kiwix_catalog_file" : "{{ content_info }}/kiwix_catalog.json",
"doc_root" : "{{ doc_root }}",
"content_base" : "/library",
"zim_dir" : "/library/zims/",
"zim_downloads_dir" : "/library/downloads/zims/",
"zim_working_dir" : "/library/working/zims/",
"zim_download_prefix" : "kiwix-0.9+",
"oer2go_catalog_file" : "{{ iiab_config_dir }}/oer2go_catalog.json",
"oer2go_catalog_file" : "{{ content_info }}/oer2go_catalog.json",
"rachel_downloads_dir" : "/library/downloads/rachel/",
"rachel_working_dir" : "/library/working/rachel/",
"oer2go_cat_url" : "{{ oer2go_cat_url }}",
Expand Down
2 changes: 1 addition & 1 deletion roles/cmdsrv/templates/scripts/get_kiwix_catalog_libxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
verbose = True

WWROOT = "{{ doc_root }}"
jsonPath = "{{ iiab_config_dir }}"
jsonPath = "{{ content_info }}"
iiab_zim_cat_url = "{{ iiab_zim_cat_url }}"

kiwix_include_zimit = False # check for tag _sw:yes
Expand Down
2 changes: 1 addition & 1 deletion roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# mode: '0755'
state: directory
with_items:
#- "{{ content_base }}/downloads" # /library/downloads auto-created just below
- "{{ content_info }}"
- "{{ content_base }}/downloads/zims"
- "{{ content_base }}/downloads/maps"
- "{{ content_base }}/downloads/rachel" # STILL USED OR NOT?
Expand Down