Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Commit 7dc36f9

Browse files
authored
Add xnat_link_data_directory variable for XNAT role (#3)
- add `xnat_link_data_directory` variable for `xnat` role (defaults to `true`) - there is already a `xnat_create_data_directory` that if `true` will ensure `xnat_web_server.storage_dir` exists with `tomcat` as the owner, and then creates a symbolic link to `external_storage_drive` - however, we need to distinguish between creating the data directory and linking to external storage - if `external_storage_directory` is defined, and is the same path as the XNAT storage directory, then we musn't create and set permissions for this path in the XNAT role. If we did, the mounted storage will have the incorrect permissions - so, if the `external_storage_drive` is the same path as `xnat_web_server.storage_dir`, then the following values should be set: ```yaml xnat_create_data_directory: false # don't set permissions for the mounted storage xnat_link_data_directory: true ```
1 parent 634ed67 commit 7dc36f9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

roles/xnat/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ xnat_config_dir: "{{ xnat_home_dir }}/config"
1313
xnat_logs_dir: "{{ xnat_home_dir }}/logs"
1414
xnat_work_dir: "{{ xnat_home_dir }}/work"
1515
xnat_create_data_directory: true
16+
xnat_link_data_directory: true

roles/xnat/tasks/directories.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
src: "{{ xnat_web_server.storage_dir }}"
1414
dest: "{{ xnat_data_dir }}"
1515
state: link
16-
when: xnat_create_data_directory and external_storage_drive is defined
16+
when: xnat_link_data_directory and external_storage_drive is defined
1717

1818
- name: "Ensure XNAT subdirectories exist"
1919
ansible.builtin.file:

0 commit comments

Comments
 (0)