Skip to content

Commit

Permalink
fix(install): Obey --without-site
Browse files Browse the repository at this point in the history
  • Loading branch information
ceefour committed Oct 27, 2020
1 parent d9521b4 commit 608b28c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions bench/playbooks/roles/bench/tasks/setup_erpnext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@
- name: Check whether the site already exists
stat: path="{{ bench_path }}/sites/{{ site }}"
register: site_folder
when: not without_site

- 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
when: not without_site and not site_folder.stat.exists

- name: Install ERPNext to default site
command: "bench --site {{ site }} install-app erpnext"
args:
chdir: "{{ bench_path }}"
when: not without_erpnext
when: not without_site and not without_erpnext
...
4 changes: 2 additions & 2 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ def get_passwords(args):
mysql_root_password = ''
continue

# admin password
if not admin_password:
# admin password, only needed if we're also creating a site
if not admin_password and not args.without_site:
admin_password = getpass.unix_getpass(prompt='Please enter the default Administrator user password: ')
conf_admin_passswd = getpass.unix_getpass(prompt='Re-enter Administrator password: ')

Expand Down

0 comments on commit 608b28c

Please sign in to comment.