2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-13 16:56:33 +00:00
bench/playbooks/roles/bench/tasks/setup_erpnext.yml
2018-04-09 11:53:51 +05:30

27 lines
859 B
YAML

---
- name: Check if ERPNext App exists
stat: path="{{ bench_path }}/apps/erpnext"
register: app
- name: Get the ERPNext app
command: bench get-app erpnext https://github.com/frappe/erpnext --branch {{ branch }}
args:
creates: "{{ bench_path }}/apps/erpnext"
chdir: "{{ bench_path }}"
when: not app.stat.exists
- name: Check whether the site already exists
stat: path="{{ bench_path }}/sites/{{ site }}"
register: site_folder
- name: Create a new site
command: "bench new-site {{ site }} --admin-password {{ admin_password }} --mariadb-root-password {{ mysql_root_password }}"
args:
chdir: "{{ bench_path }}"
when: not site_folder.stat.exists
- name: Install ERPNext to default site
command: "bench --site {{ site }} install-app erpnext"
args:
chdir: "{{ bench_path }}"
...