mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-26 12:33:09 +08:00
36 lines
1.2 KiB
YAML
36 lines
1.2 KiB
YAML
- pause:
|
|
prompt: |
|
|
Choice Baota version:
|
|
0: Baota English version
|
|
1: Baota Chinese version
|
|
private: no
|
|
Default:0
|
|
register: baota_version_options
|
|
|
|
- set_fact:
|
|
baota_version_meta:
|
|
"0": "aapanel/aapanel"
|
|
"1": "btpanel/baota"
|
|
|
|
- set_fact:
|
|
baota_version: "{{baota_version_meta[baota_version_options.user_input]}}"
|
|
|
|
- debug:
|
|
msg: "baota_version is {{baota_version}}"
|
|
|
|
- name: Config .env and docker-compose for aapanel
|
|
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 /tmp/tmp.yml > 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"
|