Create pre.yml

This commit is contained in:
qiaofeng1227 2022-07-18 16:33:28 +08:00 committed by GitHub
parent 099a5ce72a
commit a3037bc3da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,33 @@
- pause:
prompt: |
Choice MariaDB version:
0: MariaDB10.8
1: MariaDB10.7
2: MariaDB10.6
3: MariaDB10.5
4: MariaDB10.4
5: MariaDB10.3
6: MariaDB10.2
private: no
Default:0
register: version_options
- set_fact:
mariadb_version_meta:
"0": "10.8"
"1": "10.7"
"2": "10.6"
"3": "10.5"
"4": "10.4"
"5": "10.3"
"6": "10.2"
- set_fact:
mariadb_version: "{{mariadb_version_meta[version_options.user_input]}}"
- debug:
msg: "mariadb_version is {{mariadb_version}}"
- name: Config .env for start containers
shell: |
sed -i 's/APP_VERSION=.*/APP_VERSION={{mariadb_version}}/g' {{installpath}}/{{appname}}/.env