2022-05-12 14:33:59 +08:00
|
|
|
- pause:
|
|
|
|
prompt: |
|
|
|
|
Choice Erpnext version:
|
|
|
|
0: ERPNext13
|
|
|
|
1: ERPNext12
|
2022-05-12 17:12:03 +08:00
|
|
|
2: ERPNext11
|
2022-05-12 14:33:59 +08:00
|
|
|
private: no
|
|
|
|
Default:0
|
|
|
|
register: version_options
|
|
|
|
|
2022-05-16 09:04:23 +08:00
|
|
|
- set_fact:
|
|
|
|
erpnext_version_meta:
|
2022-06-30 10:22:49 +08:00
|
|
|
"0": "14"
|
|
|
|
"1": "13"
|
|
|
|
"2": "12"
|
2022-05-16 09:04:23 +08:00
|
|
|
|
2022-05-13 14:47:35 +08:00
|
|
|
- set_fact:
|
2022-05-16 08:56:34 +08:00
|
|
|
erpnext_version: "{{erpnext_version_meta[version_options.user_input]}}"
|
2022-05-13 14:47:35 +08:00
|
|
|
|
2022-05-16 08:56:34 +08:00
|
|
|
- debug:
|
|
|
|
msg: "erpnext_version is {{erpnext_version}}"
|
2022-05-12 14:33:59 +08:00
|
|
|
|
|
|
|
- name: Config .env for start containers
|
|
|
|
shell: |
|
|
|
|
public_ip=`wget -O - https://download.websoft9.com/ansible/get_ip.sh | bash`
|
2022-05-16 10:11:57 +08:00
|
|
|
sed -i 's/APP_VERSION=.*/APP_VERSION=v{{erpnext_version}}/g' {{installpath}}/{{appname}}/.env
|
|
|
|
sed -i "s/erp.example.com/$public_ip/g" {{installpath}}/{{appname}}/.env
|