diff --git a/roles/cmdsrv/tasks/main.yml b/roles/cmdsrv/tasks/main.yml index 2337416e..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 +- 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 @@ -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 @@ -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 diff --git a/roles/cmdsrv/templates/cmdsrv.conf.j2 b/roles/cmdsrv/templates/cmdsrv.conf.j2 index 75800e1a..4a308a22 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_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 }}", 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 diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 2ccc8064..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 }}/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?