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

[Minor] Store mysql and admin passwords in passwords.txt and Show success message after completion of the script

This commit is contained in:
shreyas 2016-09-22 14:53:36 +05:30
parent 164bc13c95
commit 6b5404e9c6

View File

@ -256,11 +256,18 @@ def get_passwords(ignore_prompt=False):
else:
mysql_root_password = admin_password = 'travis'
return {
passwords = {
'mysql_root_password': mysql_root_password,
'admin_password': admin_password
}
if not ignore_prompt:
passwords_file_path = os.path.join(os.path.expanduser('~'), 'passwords.txt')
with open(passwords_file_path, 'w') as f:
json.dump(passwords, f, indent=1)
return passwords
def get_extra_vars_json(extra_args):
# We need to pass production as extra_vars to the playbook to execute conditionals in the
# playbook. Extra variables can passed as json or key=value pair. Here, we will use JSON.
@ -340,3 +347,10 @@ if __name__ == '__main__':
args = parse_commandline_args()
install_bench(args)
print '''
Frappe/ERPNext has been successfully installed on your machine.
Please find mysql root password and admin password in "passwords.txt" in your root directory,
you can remove the file after making note of the passwords.
'''