Try ERPNext Try Frappe Cloud Buy Support Partners Foundation

subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'create_user.yml', '-vvvv', '-e', '@/tmp/extra_vars.json']' returned non-zero exit status 2

I try to install erpnext by following easy install method on ubunut 18.04 many times and i always get the following error , i tried all suggested solutions but unfortunately it does not work.

full traceback is:
Traceback (most recent call last):
File “/tmp/ansible-root/ansible-tmp-1617326044.826492-15674-44565905881950/AnsiballZ_file.py”, line 114, in
_ansiballz_main()
File “/tmp/ansible-root/ansible-tmp-1617326044.826492-15674-44565905881950/AnsiballZ_file.py”, line 106, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File “/tmp/ansible-root/ansible-tmp-1617326044.826492-15674-44565905881950/AnsiballZ_file.py”, line 49, in invoke_module
imp.load_module(‘main’, mod, module, MOD_DESC)
File “/usr/lib/python3.6/imp.py”, line 235, in load_module
return load_source(name, filename, file)
File “/usr/lib/python3.6/imp.py”, line 170, in load_source
module = _exec(spec, sys.modules[name])
File “”, line 618, in _exec
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/tmp/ansible_file_payload_3_1slnfo/main.py”, line 921, in
File “/tmp/ansible_file_payload_3_1slnfo/main.py”, line 907, in main
File “/tmp/ansible_file_payload_3_1slnfo/main.py”, line 629, in ensure_directory
File “/tmp/ansible_file_payload_3_1slnfo/main.py”, line 328, in recursive_set_attributes
File “/tmp/ansible_file_payload_3_1slnfo/ansible_file_payload.zip/ansible/module_utils/basic.py”, line 1422, in set_fs_attributes_if_different
File “/tmp/ansible_file_payload_3_1slnfo/ansible_file_payload.zip/ansible/module_utils/basic.py”, line 1074, in set_owner_if_different
File “/tmp/ansible_file_payload_3_1slnfo/ansible_file_payload.zip/ansible/module_utils/basic.py”, line 969, in user_and_group
PermissionError: [Errno 13] Permission denied: b’/home/erpadmin/shared-drives’

fatal: [localhost]: FAILED! => {
“changed”: false,
“module_stderr”: “Traceback (most recent call last):\n File “/tmp/ansible-root/ansible-tmp-1617326044.826492-15674-44565905881950/AnsiballZ_file.py”, line 114, in \n _ansiballz_main()\n File “/tmp/ansible-root/ansible-tmp-1617326044.826492-15674-44565905881950/AnsiballZ_file.py”, line 106, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File “/tmp/ansible-root/ansible-tmp-1617326044.826492-15674-44565905881950/AnsiballZ_file.py”, line 49, in invoke_module\n imp.load_module(‘main’, mod, module, MOD_DESC)\n File “/usr/lib/python3.6/imp.py”, line 235, in load_module\n return load_source(name, filename, file)\n File “/usr/lib/python3.6/imp.py”, line 170, in load_source\n module = _exec(spec, sys.modules[name])\n File “”, line 618, in _exec\n File “”, line 678, in exec_module\n File “”, line 219, in _call_with_frames_removed\n File “/tmp/ansible_file_payload_3_1slnfo/main.py”, line 921, in \n File “/tmp/ansible_file_payload_3_1slnfo/main.py”, line 907, in main\n File “/tmp/ansible_file_payload_3_1slnfo/main.py”, line 629, in ensure_directory\n File “/tmp/ansible_file_payload_3_1slnfo/main.py”, line 328, in recursive_set_attributes\n File “/tmp/ansible_file_payload_3_1slnfo/ansible_file_payload.zip/ansible/module_utils/basic.py”, line 1422, in set_fs_attributes_if_different\n File “/tmp/ansible_file_payload_3_1slnfo/ansible_file_payload.zip/ansible/module_utils/basic.py”, line 1074, in set_owner_if_different\n File “/tmp/ansible_file_payload_3_1slnfo/ansible_file_payload.zip/ansible/module_utils/basic.py”, line 969, in user_and_group\nPermissionError: [Errno 13] Permission denied: b’/home/erpadmin/shared-drives’\n”,
“module_stdout”: “”,
“msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”,
“rc”: 1
}

PLAY RECAP *************************************************************************************************************************************************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 498, in
install_bench(args)
File “install.py”, line 246, in install_bench
run_playbook(‘create_user.yml’, extra_vars=extra_vars)
File “install.py”, line 414, in run_playbook
success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr)
File “/usr/lib/python3.6/subprocess.py”, line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘create_user.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’]’ returned non-zero exit status 2.

Try installing with sudo

I tried to install with sudo and sudo -H

With which user are you installing? erpadmin or root?

erpadmin

/home/erpadmin/shared-drives

Check permission of this folder. If not owned by erpadmin, use chown/chmod to change ownership/permission.

Thank you dear

1 Like