From 2c78f1b2f00868bdc4b78b1acf50ad2ee25e0725 Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Fri, 8 Jul 2022 16:22:36 +0800 Subject: [PATCH] Update install.yml --- apps/tasks/install.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/apps/tasks/install.yml b/apps/tasks/install.yml index cbf46274..9b6525c0 100644 --- a/apps/tasks/install.yml +++ b/apps/tasks/install.yml @@ -2,6 +2,28 @@ shell: docker network create websoft9 failed_when: False +- name: Git Clone app docker repository + block: + - name: Delete {{app}} dir for sec_installation + shell: rm -rf {{installpath}}/{{app}} + - name: Clone {{app}} in Websoft9 + git: + repo: "https://github.com/Websoft9/docker-{{app}}.git" + dest: "{{installpath}}/{{app}}" + +- name: Excute Preparation if have pre.yml + block: + - name: Check if pre.yml exists + uri: + url: "https://github.com/Websoft9/StackHub/blob/main/apps/roles/{{app}}/tasks/pre.yml" + return_content: yes + register: pre_exists + failed_when: false + + - name: Excute pre.yml + include_tasks: roles/{{app}}/tasks/pre.yml + when: pre_exists.status is defined and pre_exists.status == 200 + - name: Docker compose up shell: | docker compose up -d