From aeb73b6966a182225f7c23c2d2534c50fc3d4c9b Mon Sep 17 00:00:00 2001 From: Yacine31 Date: Fri, 22 Dec 2023 23:39:48 +0100 Subject: [PATCH] Update main.yml --- roles/oracle-db-postinstall/tasks/main.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/roles/oracle-db-postinstall/tasks/main.yml b/roles/oracle-db-postinstall/tasks/main.yml index c6e2ec3..6d253ca 100644 --- a/roles/oracle-db-postinstall/tasks/main.yml +++ b/roles/oracle-db-postinstall/tasks/main.yml @@ -5,15 +5,29 @@ # --------------------------------------------------- # récupération des scripts sql # --------------------------------------------------- - - name: Clonage du repository github SQL + - name: Vérifier si le répertoire scripts existe + stat: + path: "{{ scripts_dir }}" + register: scripts_directory + + - name: Git Pull car le répertoire existe + git: + repo: https://github.com/Yacine31/sql.git + dest: "{{ scripts_dir }}" + update: yes + force: yes + when: scripts_directory.stat.exists + + - name: Clonage du repository github SQL car le répertoire n'existe pas git: repo: https://github.com/Yacine31/sql.git dest: "{{ scripts_dir }}" clone: yes update: yes force: yes + when: not scripts_directory.stat.exists ignore_errors: true - + # --------------------------------------------------- # changement du propriétaire de root en oracle # ---------------------------------------------------