From 9b001ef0561062a7f23a23fe426bd396f6b7a268 Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Wed, 27 Jul 2022 08:38:32 +0800 Subject: [PATCH] Update pre.yml --- apps/roles/bt/tasks/pre.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/apps/roles/bt/tasks/pre.yml b/apps/roles/bt/tasks/pre.yml index 2b9a465d..2407382b 100644 --- a/apps/roles/bt/tasks/pre.yml +++ b/apps/roles/bt/tasks/pre.yml @@ -9,8 +9,8 @@ - set_fact: baota_version_meta: - "0": "aapanel/aapanel" - "1": "btpanel/baota" + "0": "aapanel" + "1": "btpanel" - set_fact: baota_version: "{{baota_version_meta[baota_version_options.user_input]}}" @@ -18,18 +18,8 @@ - debug: msg: "baota_version is {{baota_version}}" -- name: Config .env and docker-compose for aapanel +- name: Config .env and docker-compose for start shell: | - sed -i 's/APP_REPO=.*/APP_REPO={{baota_version}}/g' {{installpath}}/{{appname}}/.env - yq eval 'del(.services.aapanel.profiles)' {{installpath}}/{{appname}}/docker-compose.yml > /tmp/tmp.yml + cat {{installpath}}/{{appname}}/docker-compose.yml |yq eval 'del(.services.aapanel.profiles)' > /tmp/tmp.yml cat /tmp/tmp.yml > {{installpath}}/{{appname}}/docker-compose.yml rm -f /tmp/tmp.yml - when: baota_version == "aapanel/aapanel" - -- name: Config .env and docker-compose for btpanel - shell: | - sed -i 's/APP_REPO=.*/APP_REPO={{baota_version}}/g' {{installpath}}/{{appname}}/.env - yq eval 'del(.services.btpanel.profiles)' {{installpath}}/{{appname}}/docker-compose.yml > /tmp/tmp.yml - cat /tmp/tmp.yml > {{installpath}}/{{appname}}/docker-compose.yml - rm -f /tmp/tmp.yml - when: baota_version == "btpanel/baota"