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

30 lines
643 B
YAML
Raw Normal View History

2022-07-19 08:27:23 +08:00
- pause:
prompt: |
Choice Odoo version:
2022-10-17 15:47:44 +08:00
0: Odoo16
1: Odoo15
2: Odoo14
3: Odoo13
4: Odoo12
2022-07-19 08:27:23 +08:00
private: no
Default:0
2022-07-19 14:18:19 +08:00
register: odoo_version_options
2022-07-15 08:56:27 +08:00
2022-07-19 08:27:23 +08:00
- set_fact:
odoo_version_meta:
2022-10-17 15:47:44 +08:00
"0": "16"
"1": "15"
"2": "14"
"3": "13"
"4": "12"
2022-07-19 08:27:23 +08:00
- set_fact:
2022-07-19 14:18:19 +08:00
odoo_version: "{{odoo_version_meta[odoo_version_options.user_input]}}"
2022-07-19 08:27:23 +08:00
- debug:
msg: "odoo_version is {{odoo_version}}"
- name: Config .env for start containers
shell: |
sed -i 's/APP_VERSION=.*/APP_VERSION={{odoo_version}}/g' {{installpath}}/{{appname}}/.env