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

36 lines
788 B
YAML
Raw Normal View History

2022-07-18 16:33:28 +08:00
- 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
2022-07-26 08:30:30 +08:00
7: MariaDB10.1
2022-07-18 16:33:28 +08:00
private: no
Default:0
2022-07-19 17:39:37 +08:00
register: mariadb_version_options
2022-07-18 16:33:28 +08:00
- 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"
2022-07-26 08:30:30 +08:00
"7": "10.1"
2022-07-18 16:33:28 +08:00
- set_fact:
2022-07-19 17:39:37 +08:00
mariadb_version: "{{mariadb_version_meta[mariadb_version_options.user_input]}}"
2022-07-18 16:33:28 +08:00
- 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