From 2452fe58adadcbdbcd0e6e440c7900a51a39bdee Mon Sep 17 00:00:00 2001 From: Yacine31 Date: Tue, 2 Dec 2025 16:23:17 +0100 Subject: [PATCH] Improve validations.yml to create scripts_dir if missing - Replace directory existence check with directory creation - Ensure proper ownership (oracle:oinstall) and permissions (0755) - Remove failed_when that was causing unnecessary failures - Make postinstall role more robust for different environments --- roles/oracle-db-postinstall/tasks/validations.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/roles/oracle-db-postinstall/tasks/validations.yml b/roles/oracle-db-postinstall/tasks/validations.yml index ac834c4..346cd22 100644 --- a/roles/oracle-db-postinstall/tasks/validations.yml +++ b/roles/oracle-db-postinstall/tasks/validations.yml @@ -3,11 +3,14 @@ # Validations préalables pour le rôle oracle-db-postinstall # -- name: Vérifier que le répertoire scripts_dir existe - ansible.builtin.stat: +- name: Créer le répertoire scripts_dir s'il n'existe pas + ansible.builtin.file: path: "{{ scripts_dir }}" - register: scripts_dir_check - failed_when: not scripts_dir_check.stat.exists + state: directory + owner: oracle + group: oinstall + mode: '0755' + recurse: yes tags: prerequisites - name: Vérifier que ORACLE_HOME est accessible