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

26 lines
662 B
YAML
Raw Normal View History

2022-07-22 14:21:46 +08:00
- pause:
prompt: |
Choice SQL Server version:
0: SQL Server2022
1: SQL Server2019
2022-07-22 14:21:59 +08:00
2: SQL Server2017
2022-07-22 14:21:46 +08:00
private: no
Default:0
register: sqlserver_version_options
2022-07-15 08:56:27 +08:00
2022-07-22 14:21:46 +08:00
- set_fact:
sqlserver_version_meta:
"0": "2022-latest"
"1": "2019-latest"
"2": "2017-latest"
2022-07-22 14:21:59 +08:00
2022-07-22 14:21:46 +08:00
- 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=v{{sqlserver_version}}/g' {{installpath}}/{{appname}}/.env