websoft9/apps/roles/zabbix/tasks/pre.yml
2022-07-23 10:05:26 +08:00

24 lines
556 B
YAML

- pause:
prompt: |
Choice Zabbix version:
0: Zabbix5.4
1: Zabbix5.2
private: no
Default:0
register: zabbix_version_options
- set_fact:
zabbix_version_meta:
"0": "5.4"
"1": "5.2"
- set_fact:
zabbix_version: "{{zabbix_version_meta[zabbix_version_options.user_input]}}"
- debug:
msg: "zabbix_version is {{zabbix_version}}"
- name: Config .env for start containers
shell: |
sed -i 's/APP_VERSION=.*/APP_VERSION={{zabbix_version}}/g' {{installpath}}/{{appname}}/.env