websoft9/apps/roles/sqlserver/tasks/pre.yml
2022-11-18 13:55:55 +08:00

26 lines
661 B
YAML

- pause:
prompt: |
Choice SQL Server version:
0: SQL Server2022
1: SQL Server2019
2: SQL Server2017
private: no
Default:0
register: sqlserver_version_options
- set_fact:
sqlserver_version_meta:
"0": "2022-latest"
"1": "2019-latest"
"2": "2017-latest"
- set_fact:
sqlserver_version: "{{sqlserver_version_meta[sqlserver_version_options.user_input]}}"
- debug:
msg: "sqlserver_version is {{sqlserver_version}}"
- name: Config .env for start containers
shell: |
sed -i 's/APP_VERSION=.*/APP_VERSION={{sqlserver_version}}/g' {{installpath}}/{{appname}}/.env