websoft9/apps/roles/erpnext/tasks/pre.yml
2022-07-01 08:06:24 +08:00

28 lines
719 B
YAML

- pause:
prompt: |
Choice Erpnext version:
0: ERPNext14
1: ERPNext13
2: ERPNext12
private: no
Default:0
register: version_options
- set_fact:
erpnext_version_meta:
"0": "14"
"1": "13"
"2": "12"
- set_fact:
erpnext_version: "{{erpnext_version_meta[version_options.user_input]}}"
- debug:
msg: "erpnext_version is {{erpnext_version}}"
- name: Config .env for start containers
shell: |
public_ip=`wget -O - https://download.websoft9.com/ansible/get_ip.sh | bash`
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