UCL-MIRSG / ansible-collection-infra

Ansible Collection to configure infrastructure for XNAT and OMERO
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

`siteUrl` currently exists in two places #80

Open paddyroddy opened 4 months ago

paddyroddy commented 4 months ago

Short Description

Currently, siteUrl exists in two places:

  1. https://github.com/UCL-MIRSG/ansible-collection-infra/blob/163a8ddc552b0131df71e9e44ae67b0f582a6d01/roles/xnat/templates/prefs-init.j2#L4
  2. https://github.com/UCL-MIRSG/ansible-collection-infra/blob/163a8ddc552b0131df71e9e44ae67b0f582a6d01/roles/xnat/templates/xnat-settings.json.j2#L74

It seems that only the latter is actually used. Possibly the latter overwrites the former? Either way, this should be addressed.

Evidence/Steps to Reproduce

No response

Acceptance Criteria/Expected Behaviour

No response

Details

No response

Resolution

No response

p-j-smith commented 3 months ago

Looking again at this, all of the variables in the siteConfig section of prefs-init.j2 are repeated in xnat-settings.json.j2.

https://github.com/UCL-MIRSG/ansible-collection-infra/blob/163a8ddc552b0131df71e9e44ae67b0f582a6d01/roles/xnat/templates/prefs-init.j2#L1-L18

The only difference is the value of initialized, which is true in `xnat-settings.json.j2. I think we probably don't need to set them again with the config (or alternatively remove them from the prefs-init).

And the XNAT docs suggest that you only set the paths (archivePath etc.) once, and then don't change them. Not sure what would happen if we changed these paths during an upgrade?