From f4ba5dcabd52186c615bb9a93ea8d92a93153c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 5 Sep 2024 13:02:35 +0200 Subject: [PATCH 1/4] add modules/EESSI directory and symlink to 2023.06 modulefile --- .../vars/software.eessi.io.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/create_cvmfs_content_structure/vars/software.eessi.io.yml b/roles/create_cvmfs_content_structure/vars/software.eessi.io.yml index 745e1145..0fac456e 100644 --- a/roles/create_cvmfs_content_structure/vars/software.eessi.io.yml +++ b/roles/create_cvmfs_content_structure/vars/software.eessi.io.yml @@ -1,6 +1,10 @@ # Specifications of files and symlinks for the software.eessi.io CVMFS repository. # Paths for files and symlinks should be relative to the root of the repository. --- +directories: + - name: modules/EESSI + mode: '755' + files: - name: .cvmfsdirtab dest: '' @@ -12,3 +16,4 @@ files: symlinks: host_injections: '$(EESSI_HOST_INJECTIONS:-/opt/eessi)' + modules/EESSI/2023.06.lua: /cvmfs/software.eessi.io/versions/2023.06/init/modules/EESSI/2023.06.lua From 4a35efb97c6731b0ee2a75e878bdfd9d82d347a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 5 Sep 2024 13:02:52 +0200 Subject: [PATCH 2/4] add step for creating directories --- roles/create_cvmfs_content_structure/tasks/do_repo.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roles/create_cvmfs_content_structure/tasks/do_repo.yml b/roles/create_cvmfs_content_structure/tasks/do_repo.yml index 06ccf2d4..82eaedf6 100644 --- a/roles/create_cvmfs_content_structure/tasks/do_repo.yml +++ b/roles/create_cvmfs_content_structure/tasks/do_repo.yml @@ -10,6 +10,14 @@ - name: Apply changes to CVMFS repository, if there are any block: + - name: "Create directories" + ansible.builtin.file: + path: "/cvmfs/{{ cvmfs_repo }}/{{ item.name }}" + state: directory + mode: "{{ item.mode }}" + with_items: "{{ directories }}" + register: create_directories + - name: "Create symlinks" ansible.builtin.file: path: "/cvmfs/{{ cvmfs_repo }}/{{ item }}" From 20ca1a60b9fe5a53fe32a76fbda60e494eb87561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 5 Sep 2024 13:03:16 +0200 Subject: [PATCH 3/4] add -f option to abort command --- roles/create_cvmfs_content_structure/tasks/do_repo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/create_cvmfs_content_structure/tasks/do_repo.yml b/roles/create_cvmfs_content_structure/tasks/do_repo.yml index 82eaedf6..977acb00 100644 --- a/roles/create_cvmfs_content_structure/tasks/do_repo.yml +++ b/roles/create_cvmfs_content_structure/tasks/do_repo.yml @@ -49,7 +49,7 @@ rescue: - name: Abort transaction - ansible.builtin.command: "cvmfs_server abort {{ cvmfs_repo }}" + ansible.builtin.command: "cvmfs_server abort -f {{ cvmfs_repo }}" when: cvmfs_start_transaction and cvmfs_abort_transaction_on_failures - name: Exit because of failure From 6fbedaa90d8e836e1cdcea359bff04ed613d2911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 5 Sep 2024 13:23:18 +0200 Subject: [PATCH 4/4] use init/modules as top-level dir for the modulefiles --- .../create_cvmfs_content_structure/vars/software.eessi.io.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/create_cvmfs_content_structure/vars/software.eessi.io.yml b/roles/create_cvmfs_content_structure/vars/software.eessi.io.yml index 0fac456e..b4908c11 100644 --- a/roles/create_cvmfs_content_structure/vars/software.eessi.io.yml +++ b/roles/create_cvmfs_content_structure/vars/software.eessi.io.yml @@ -2,7 +2,7 @@ # Paths for files and symlinks should be relative to the root of the repository. --- directories: - - name: modules/EESSI + - name: init/modules/EESSI mode: '755' files: @@ -16,4 +16,4 @@ files: symlinks: host_injections: '$(EESSI_HOST_INJECTIONS:-/opt/eessi)' - modules/EESSI/2023.06.lua: /cvmfs/software.eessi.io/versions/2023.06/init/modules/EESSI/2023.06.lua + init/modules/EESSI/2023.06.lua: /cvmfs/software.eessi.io/versions/2023.06/init/modules/EESSI/2023.06.lua