From 61f3d2294fc5771f47358790210f6f10cc5ae2f4 Mon Sep 17 00:00:00 2001 From: Jens Steidl <Jens.Steidl@slub-dresden.de> Date: Tue, 14 Nov 2023 15:50:53 +0100 Subject: [PATCH] feat: new task to correct permissions/owner/group for permanent shares only --- tasks/configure_nfs_mounts.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/tasks/configure_nfs_mounts.yml b/tasks/configure_nfs_mounts.yml index 9f6034f..10feacf 100644 --- a/tasks/configure_nfs_mounts.yml +++ b/tasks/configure_nfs_mounts.yml @@ -79,14 +79,16 @@ mode: "0770" loop: "{{ ingest_dirs.files }}" -#- name: set correct permissions/owner/group for permanent shares -# ansible.builtin.file: -# path: "{{ item.1.path }}" -# state: directory -# owner: "{{ vault_rosetta_user }}" -# group: "{{ vault_rosetta_group }}" -# mode: "0755" -# loop: "{{ volumes | subelements('shares') }}" -# loop_control: -# label: "{{ item.0 }}" -# when: ansible_hostname in item.0.hosts +- name: set correct permissions/owner/group for permanent shares + ansible.builtin.file: + path: "{{ item.1.path }}" + state: directory + owner: "{{ vault_rosetta_user }}" + group: "{{ vault_rosetta_group }}" + mode: "0755" + loop: "{{ volumes | subelements('shares') }}" + loop_control: + label: "{{ item.0 }}" + when: + - (ansible_hostname in item.0.hosts) + - ("permanent" in item.1.path) -- GitLab