Here is the full log:
TASK [bench : Create a new site] ***************************************************************************************************************************************
task path: /tmp/.bench/playbooks/roles/bench/tasks/setup_erpnext.yml:17
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /var/tmp/ansible-tmp-1593006061.8039832-103643141580621 `" && echo ansible-tmp-1593006061.8039832-103643141580621="` echo /var/tmp/ansible-tmp-1593006061.8039832-103643141580621 `" ) && sleep 0'
Using module file /usr/local/lib/python3.8/dist-packages/ansible/modules/commands/command.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-27947_b6w9h1y/tmpaol5rhje TO /var/tmp/ansible-tmp-1593006061.8039832-103643141580621/AnsiballZ_command.py
<127.0.0.1> EXEC /bin/sh -c 'setfacl -m u:erpnext:r-x /var/tmp/ansible-tmp-1593006061.8039832-103643141580621/ /var/tmp/ansible-tmp-1593006061.8039832-103643141580621/AnsiballZ_command.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'sudo -H -S -n -u erpnext /bin/sh -c '"'"'echo BECOME-SUCCESS-gyqcwcympvgbhcjhqlapbqxelflvmyxr ; /usr/bin/python3 /var/tmp/ansible-tmp-1593006061.8039832-103643141580621/AnsiballZ_command.py'"'"' && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /var/tmp/ansible-tmp-1593006061.8039832-103643141580621/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
"changed": true,
"cmd": [
"bench",
"new-site",
"site1.local",
"--admin-password",
"admin",
"--mariadb-root-password",
"toor"
],
"delta": "0:00:02.469270",
"end": "2020-06-24 18:11:04.483878",
"invocation": {
"module_args": {
"_raw_params": "bench new-site site1.local --admin-password 'admin' --mariadb-root-password 'toor'",
"_uses_shell": false,
"argv": null,
"chdir": "/home/erpnext/frappe-bench",
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"stdin_add_newline": true,
"strip_empty_ends": true,
"warn": true
}
},
"msg": "non-zero return code",
"rc": 1,
"start": "2020-06-24 18:11:02.014608",
"stderr": "Traceback (most recent call last):\n File \"/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py\", line 68, in get_app_commands\n app_command_module = importlib.import_module(app + '.commands')\n File \"/home/erpnext/frappe-bench/env/lib/python3.8/importlib/__init__.py\", line 127, in import_module\n return _bootstrap._gcd_import(name[level:], package, level)\n File \"<frozen importlib._bootstrap>\", line 1014, in _gcd_import\n File \"<frozen importlib._bootstrap>\", line 991, in _find_and_load\n File \"<frozen importlib._bootstrap>\", line 961, in _find_and_load_unlocked\n File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\n File \"<frozen importlib._bootstrap>\", line 1014, in _gcd_import\n File \"<frozen importlib._bootstrap>\", line 991, in _find_and_load\n File \"<frozen importlib._bootstrap>\", line 973, in _find_and_load_unlocked\nModuleNotFoundError: No module named 'erpnext'\nTraceback (most recent call last):\n File \"/usr/lib/python3.8/runpy.py\", line 193, in _run_module_as_main\n return _run_code(code, main_globals, None,\n File \"/usr/lib/python3.8/runpy.py\", line 86, in _run_code\n exec(code, run_globals)\n File \"/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py\", line 99, in <module>\n main()\n File \"/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py\", line 18, in main\n click.Group(commands=commands)(prog_name='bench')\n File \"/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 764, in __call__\n return self.main(*args, **kwargs)\n File \"/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 717, in main\n rv = self.invoke(ctx)\n File \"/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 1137, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File \"/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 1137, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File \"/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 956, in invoke\n return ctx.invoke(self.callback, **ctx.params)\n File \"/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 555, in invoke\n return callback(*args, **kwargs)\n File \"/home/erpnext/frappe-bench/apps/frappe/frappe/commands/site.py\", line 43, in new_site\n frappe.init(site=site, new_site=True)\n File \"/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py\", line 174, in init\n setup_module_map()\n File \"/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py\", line 998, in setup_module_map\n for module in get_module_list(app):\n File \"/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py\", line 868, in get_module_list\n return get_file_items(os.path.join(os.path.dirname(get_module(app_name).__file__), \"modules.txt\"))\n File \"/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py\", line 826, in get_module\n return importlib.import_module(modulename)\n File \"/home/erpnext/frappe-bench/env/lib/python3.8/importlib/__init__.py\", line 127, in import_module\n return _bootstrap._gcd_import(name[level:], package, level)\n File \"<frozen importlib._bootstrap>\", line 1014, in _gcd_import\n File \"<frozen importlib._bootstrap>\", line 991, in _find_and_load\n File \"<frozen importlib._bootstrap>\", line 973, in _find_and_load_unlocked\nModuleNotFoundError: No module named 'erpnext'",
"stderr_lines": [
"Traceback (most recent call last):",
" File \"/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py\", line 68, in get_app_commands",
" app_command_module = importlib.import_module(app + '.commands')",
" File \"/home/erpnext/frappe-bench/env/lib/python3.8/importlib/__init__.py\", line 127, in import_module",
" return _bootstrap._gcd_import(name[level:], package, level)",
" File \"<frozen importlib._bootstrap>\", line 1014, in _gcd_import",
" File \"<frozen importlib._bootstrap>\", line 991, in _find_and_load",
" File \"<frozen importlib._bootstrap>\", line 961, in _find_and_load_unlocked",
" File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed",
" File \"<frozen importlib._bootstrap>\", line 1014, in _gcd_import",
" File \"<frozen importlib._bootstrap>\", line 991, in _find_and_load",
" File \"<frozen importlib._bootstrap>\", line 973, in _find_and_load_unlocked",
"ModuleNotFoundError: No module named 'erpnext'",
"Traceback (most recent call last):",
" File \"/usr/lib/python3.8/runpy.py\", line 193, in _run_module_as_main",
" return _run_code(code, main_globals, None,",
" File \"/usr/lib/python3.8/runpy.py\", line 86, in _run_code",
" exec(code, run_globals)",
" File \"/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py\", line 99, in <module>",
" main()",
" File \"/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py\", line 18, in main",
" click.Group(commands=commands)(prog_name='bench')",
" File \"/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 764, in __call__",
" return self.main(*args, **kwargs)",
" File \"/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 717, in main",
" rv = self.invoke(ctx)",
" File \"/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 1137, in invoke",
" return _process_result(sub_ctx.command.invoke(sub_ctx))",
" File \"/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 1137, in invoke",
" return _process_result(sub_ctx.command.invoke(sub_ctx))",
" File \"/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 956, in invoke",
" return ctx.invoke(self.callback, **ctx.params)",
" File \"/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py\", line 555, in invoke",
" return callback(*args, **kwargs)",
" File \"/home/erpnext/frappe-bench/apps/frappe/frappe/commands/site.py\", line 43, in new_site",
" frappe.init(site=site, new_site=True)",
" File \"/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py\", line 174, in init",
" setup_module_map()",
" File \"/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py\", line 998, in setup_module_map",
" for module in get_module_list(app):",
" File \"/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py\", line 868, in get_module_list",
" return get_file_items(os.path.join(os.path.dirname(get_module(app_name).__file__), \"modules.txt\"))",
" File \"/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py\", line 826, in get_module",
" return importlib.import_module(modulename)",
" File \"/home/erpnext/frappe-bench/env/lib/python3.8/importlib/__init__.py\", line 127, in import_module",
" return _bootstrap._gcd_import(name[level:], package, level)",
" File \"<frozen importlib._bootstrap>\", line 1014, in _gcd_import",
" File \"<frozen importlib._bootstrap>\", line 991, in _find_and_load",
" File \"<frozen importlib._bootstrap>\", line 973, in _find_and_load_unlocked",
"ModuleNotFoundError: No module named 'erpnext'"
],
"stdout": "",
"stdout_lines": []
}
PLAY RECAP *************************************************************************************************************************************************************
localhost : ok=77 changed=28 unreachable=0 failed=1 skipped=61 rescued=0 ignored=0
Traceback (most recent call last):
File "install.py", line 632, in <module>
install_bench(args)
File "install.py", line 293, in install_bench
run_playbook("site.yml", sudo=True, extra_vars=extra_vars)
File "install.py", line 439, in run_playbook
success = subprocess.check_call(
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-vvvv', '-e', '@/tmp/extra_vars.json', '--become', '--become-user=erpnext']' returned non-zero exit status 2.