Update main.yml

This commit is contained in:
Yacine31
2023-12-22 23:39:48 +01:00
parent b3b224b808
commit aeb73b6966

View File

@@ -5,13 +5,27 @@
# ---------------------------------------------------
# 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
# ---------------------------------------------------