From f475d321feafcf4c508f7485a085606a6aabf0e6 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Fri, 26 Nov 2021 10:57:43 -0600 Subject: [PATCH 1/3] move metadata to info dir move metadata to info dir2 info wording --- roles/cmdsrv/tasks/main.yml | 30 ++++++++++++++++++++------- roles/cmdsrv/templates/cmdsrv.conf.j2 | 6 +++--- roles/common/tasks/main.yml | 2 +- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/roles/cmdsrv/tasks/main.yml b/roles/cmdsrv/tasks/main.yml index 2337416e..c7a248db 100644 --- a/roles/cmdsrv/tasks/main.yml +++ b/roles/cmdsrv/tasks/main.yml @@ -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_base }}/info/kiwix_catalog.json copy: src="json/kiwix_catalog.json" - dest="/etc/iiab/kiwix_catalog.json" + dest="{{ content_base }}/info/kiwix_catalog.json" mode=0644 force=no owner=root @@ -199,9 +199,9 @@ #- debug: var=kiwix_cat.stdout_lines -- name: Copy default oer2go_catalog.json +- name: Copy default oer2go_catalog.json to {{ content_base }}/info/oer2go_catalog.json copy: src="json/oer2go_catalog.json" - dest="/etc/iiab/oer2go_catalog.json" + dest="{{ content_base }}/info/oer2go_catalog.json" mode=0644 force=no owner=root @@ -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_base }}/info/kiwix_catalog.json + file: src={{ content_base }}/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_base }}/info/oer2go_catalog.json + file: src={{ content_base }}/info/oer2go_catalog.json dest={{ doc_root }}/common/assets/oer2go_catalog.json owner=root group=root state=link +- name: Create symlink from {{ content_base }}/info/kiwix_catalog.json -> {{ iiab_etc_path }}/kiwix_catalog.json + file: src={{ content_base }}/info/kiwix_catalog.json + dest={{ iiab_etc_path }}/kiwix_catalog.json + owner=root + group=root + state=link + +- name: Create symlink from {{ content_base }}/info/oer2go_catalog.json -> {{ iiab_etc_path }}/oer2go_catalog.json + file: src={{ content_base }}/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 diff --git a/roles/cmdsrv/templates/cmdsrv.conf.j2 b/roles/cmdsrv/templates/cmdsrv.conf.j2 index 75800e1a..a6b4a1f9 100644 --- a/roles/cmdsrv/templates/cmdsrv.conf.j2 +++ b/roles/cmdsrv/templates/cmdsrv.conf.j2 @@ -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_base }}/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_base }}/info/oer2go_catalog.json", "rachel_downloads_dir" : "/library/downloads/rachel/", "rachel_working_dir" : "/library/working/rachel/", "oer2go_cat_url" : "{{ oer2go_cat_url }}", diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 2ccc8064..a26d06ae 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -21,7 +21,7 @@ # mode: '0755' state: directory with_items: - #- "{{ content_base }}/downloads" # /library/downloads auto-created just below + - "{{ content_base }}/info" - "{{ content_base }}/downloads/zims" - "{{ content_base }}/downloads/maps" - "{{ content_base }}/downloads/rachel" # STILL USED OR NOT? From 93e38e87c795054991f24a1ddb94f924f9f22640 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Wed, 8 Dec 2021 16:22:26 -0600 Subject: [PATCH 2/3] info -> iiab --- roles/cmdsrv/tasks/main.yml | 24 ++++++++++++------------ roles/cmdsrv/templates/cmdsrv.conf.j2 | 4 ++-- roles/common/tasks/main.yml | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/roles/cmdsrv/tasks/main.yml b/roles/cmdsrv/tasks/main.yml index c7a248db..99e1b855 100644 --- a/roles/cmdsrv/tasks/main.yml +++ b/roles/cmdsrv/tasks/main.yml @@ -185,9 +185,9 @@ - utilities/iiab-install-oer2go-mod - utilities/iiab-sync-menu-defs -- name: Copy default kiwix_catalog.json to {{ content_base }}/info/kiwix_catalog.json +- name: Copy default kiwix_catalog.json to {{ content_info }}/kiwix_catalog.json copy: src="json/kiwix_catalog.json" - dest="{{ content_base }}/info/kiwix_catalog.json" + dest="{{ content_info }}/kiwix_catalog.json" mode=0644 force=no owner=root @@ -199,9 +199,9 @@ #- debug: var=kiwix_cat.stdout_lines -- name: Copy default oer2go_catalog.json to {{ content_base }}/info/oer2go_catalog.json +- name: Copy default oer2go_catalog.json to {{ content_info }}/oer2go_catalog.json copy: src="json/oer2go_catalog.json" - dest="{{ content_base }}/info/oer2go_catalog.json" + dest="{{ content_info }}/oer2go_catalog.json" mode=0644 force=no owner=root @@ -211,29 +211,29 @@ # shell: "iiab-get-oer2go-cat" # register: oer2go_cat -- name: Create symlink from {{ doc_root }}/common/assets/kiwix_catalog.json -> {{ content_base }}/info/kiwix_catalog.json - file: src={{ content_base }}/info/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 {{ doc_root }}/common/assets/oer2go_catalog.json -> {{ content_base }}/info/oer2go_catalog.json - file: src={{ content_base }}/info/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_base }}/info/kiwix_catalog.json -> {{ iiab_etc_path }}/kiwix_catalog.json - file: src={{ content_base }}/info/kiwix_catalog.json +- 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_base }}/info/oer2go_catalog.json -> {{ iiab_etc_path }}/oer2go_catalog.json - file: src={{ content_base }}/info/oer2go_catalog.json +- 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 diff --git a/roles/cmdsrv/templates/cmdsrv.conf.j2 b/roles/cmdsrv/templates/cmdsrv.conf.j2 index a6b4a1f9..4a308a22 100644 --- a/roles/cmdsrv/templates/cmdsrv.conf.j2 +++ b/roles/cmdsrv/templates/cmdsrv.conf.j2 @@ -17,13 +17,13 @@ "cmdsrv_lower_job_priority_flag" : {{ cmdsrv_lower_job_priority_flag }}, "cmdsrv_lower_job_priority_str" : "{{ cmdsrv_lower_job_priority_str }}", "content_base" : "{{ content_base }}", - "kiwix_catalog_file" : {{ content_base }}/info/kiwix_catalog.json", + "kiwix_catalog_file" : "{{ content_info }}/kiwix_catalog.json", "doc_root" : "{{ doc_root }}", "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" : "{{ content_base }}/info/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 }}", diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index a26d06ae..30ed94a7 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -21,7 +21,7 @@ # mode: '0755' state: directory with_items: - - "{{ content_base }}/info" + - "{{ content_info }}" - "{{ content_base }}/downloads/zims" - "{{ content_base }}/downloads/maps" - "{{ content_base }}/downloads/rachel" # STILL USED OR NOT? From 6c7d1e7e4cb7313800bf64907e38073f58e63b38 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Thu, 9 Dec 2021 11:58:21 -0600 Subject: [PATCH 3/3] get_kiwix_catalog - IIAB_PATH='{{ content_info }}' --- roles/cmdsrv/templates/scripts/get_kiwix_catalog_libxml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/cmdsrv/templates/scripts/get_kiwix_catalog_libxml.py b/roles/cmdsrv/templates/scripts/get_kiwix_catalog_libxml.py index 953dd69c..63e593a0 100644 --- a/roles/cmdsrv/templates/scripts/get_kiwix_catalog_libxml.py +++ b/roles/cmdsrv/templates/scripts/get_kiwix_catalog_libxml.py @@ -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