websoft9/apps/roles/bt/tasks/pre.yml

26 lines
686 B
YAML
Raw Normal View History

2022-07-25 11:31:57 +08:00
- 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:
2022-07-27 08:38:32 +08:00
"0": "aapanel"
"1": "btpanel"
2022-07-25 11:31:57 +08:00
- set_fact:
baota_version: "{{baota_version_meta[baota_version_options.user_input]}}"
- debug:
msg: "baota_version is {{baota_version}}"
2022-07-27 08:38:32 +08:00
- name: Config .env and docker-compose for start
2022-07-26 10:02:03 +08:00
shell: |
2022-07-27 09:01:42 +08:00
cat {{installpath}}/{{appname}}/docker-compose.yml |yq eval 'del(.services.{{baota_version}}.profiles)' > /tmp/tmp.yml
2022-07-26 14:14:13 +08:00
cat /tmp/tmp.yml > {{installpath}}/{{appname}}/docker-compose.yml
2022-07-26 11:37:13 +08:00
rm -f /tmp/tmp.yml