From deea4e41e82894f274f13a2be493b4bab2d405f3 Mon Sep 17 00:00:00 2001 From: XaverStiensmeier Date: Thu, 7 Nov 2024 15:39:50 +0100 Subject: [PATCH] fixed bug regarding dontUploadCredentials --- .../roles/bibigrid/tasks/042-slurm-server.yaml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/resources/playbook/roles/bibigrid/tasks/042-slurm-server.yaml b/resources/playbook/roles/bibigrid/tasks/042-slurm-server.yaml index 059e11ef..43aa1876 100644 --- a/resources/playbook/roles/bibigrid/tasks/042-slurm-server.yaml +++ b/resources/playbook/roles/bibigrid/tasks/042-slurm-server.yaml @@ -1,8 +1,16 @@ -- name: Change group ownership of OpenStack credentials file to slurm - file: - path: /etc/openstack/clouds.yaml - group: slurm - mode: "0o640" # (owner can read/write, group can read, others have no access) +- name: Change group ownership of OpenStack credentials file to slurm if it exists + block: + - name: Check if the OpenStack credentials file exists + stat: + path: /etc/openstack/clouds.yaml + register: file_stat + + - name: Change group ownership of OpenStack credentials file to slurm + file: + path: /etc/openstack/clouds.yaml + group: slurm + mode: "0o640" # (owner can read/write, group can read, others have no access) + when: file_stat.stat.exists - name: Create slurm db mysql_db: