2
0
mirror of https://github.com/frappe/bench.git synced 2025-02-05 04:18:25 +00:00

61 lines
1.6 KiB
YAML
Raw Normal View History

2016-03-15 12:24:17 +05:30
---
2016-05-25 16:17:48 +05:30
- name: Check if /tmp/.bench exists
stat:
path: /tmp/.bench
register: tmp_bench
- name: Check if bench_repo_path exists
stat:
path: '{{ bench_repo_path }}'
register: bench_repo_register
- name: move /tmp/.bench if it exists
command: 'cp -R /tmp/.bench {{ bench_repo_path }}'
when: tmp_bench.stat.exists and not bench_repo_register.stat.exists
2016-03-15 12:24:17 +05:30
- name: install bench
pip: name={{ bench_repo_path }} extra_args='-e'
become: yes
become_user: root
2016-03-15 12:24:17 +05:30
2017-05-15 17:45:26 +02:00
- name: Overwrite bench if required
file:
state: absent
path: "{{ bench_path }}"
when: overwrite
- name: Check whether bench exists
stat: path="{{ bench_path }}"
register: bench_stat
2016-03-15 12:24:17 +05:30
- name: init bench
command: bench init {{ bench_path }} --frappe-branch {{ branch }}
2016-03-15 12:24:17 +05:30
args:
creates: "{{ bench_path }}"
when: not bench_stat.stat.exists
2016-03-15 18:11:08 +05:30
# setup common_site_config
- name: setup config
command: bench setup config
args:
creates: "{{ bench_path }}/sites/common_site_config.json"
chdir: "{{ bench_path }}"
2016-03-17 12:59:44 +05:30
2016-03-15 12:24:17 +05:30
- name: install frappe app
command: bench get-app frappe https://github.com/frappe/frappe
args:
creates: "{{ bench_path }}/apps/frappe"
chdir: "{{ bench_path }}"
2018-02-05 15:07:14 +05:30
- include_tasks: setup_dev_env.yml
when: not run_travis and not production and (not without_bench_setup and ansible_distribution == 'Ubuntu')
- include_tasks: setup_inputrc.yml
# Setup Bench for production environment
- include_tasks: setup_bench_production.yml
vars:
bench_path: "/home/{{ frappe_user }}/{{ bench_name }}"
when: not run_travis and production
...