2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-09 16:36:25 +00:00

fix(install): Obey --without-site

This commit is contained in:
Hendy Irawan 2020-10-04 07:07:41 +00:00 committed by Hendy Irawan
parent d9521b4406
commit 608b28c246
2 changed files with 5 additions and 4 deletions

View File

@ -13,16 +13,17 @@
- name: Check whether the site already exists - name: Check whether the site already exists
stat: path="{{ bench_path }}/sites/{{ site }}" stat: path="{{ bench_path }}/sites/{{ site }}"
register: site_folder register: site_folder
when: not without_site
- name: Create a new site - name: Create a new site
command: "bench new-site {{ site }} --admin-password '{{ admin_password }}' --mariadb-root-password '{{ mysql_root_password }}'" command: "bench new-site {{ site }} --admin-password '{{ admin_password }}' --mariadb-root-password '{{ mysql_root_password }}'"
args: args:
chdir: "{{ bench_path }}" 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 - name: Install ERPNext to default site
command: "bench --site {{ site }} install-app erpnext" command: "bench --site {{ site }} install-app erpnext"
args: args:
chdir: "{{ bench_path }}" chdir: "{{ bench_path }}"
when: not without_erpnext when: not without_site and not without_erpnext
... ...

View File

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