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

32 lines
708 B
YAML
Raw Normal View History

2022-07-23 10:05:03 +08:00
- pause:
prompt: |
Choice Zabbix version:
2022-12-11 18:38:43 +08:00
0: Zabbix6.2
2022-07-26 09:21:13 +08:00
1: Zabbix5.4
2: Zabbix5.2
3: Zabbix5.0
4: Zabbix4.0
5: Zabbix3.0
2022-07-23 10:05:03 +08:00
private: no
Default:0
register: zabbix_version_options
2022-07-15 08:56:27 +08:00
2022-07-23 10:05:03 +08:00
- set_fact:
zabbix_version_meta:
2022-12-11 18:38:43 +08:00
"0": "6.2"
2022-07-27 14:45:46 +08:00
"1": "5.4"
"2": "5.2"
"3": "5.0"
"4": "4.0"
"5": "3.0"
2022-07-23 10:05:03 +08:00
- 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: |
2022-07-23 10:05:26 +08:00
sed -i 's/APP_VERSION=.*/APP_VERSION={{zabbix_version}}/g' {{installpath}}/{{appname}}/.env