There are a number of posts on this, but there does not seem to be any resolution.
I am running the installation script as the erpnext
user, which is in the wheel
group and so has sudo
rights.
[erpnext@centos-server ~]$ sudo python install.py --production --site erpnext-prd.robertson.local --user erpnext --bench-name erpnext-prd --verbose 2>&1 | tee erpnext-install.log
It fails here
TASK [move /tmp/.bench if it exists] *******************************************
task path: /tmp/.bench/playbooks/develop/includes/setup_bench.yml:12
Using module file /usr/lib/python2.7/site-packages/ansible/modules/commands/command.py
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /tmp/ansible-tmp-1511885989.72-130172443975095 `" && echo ansible-tmp-1511885989.72-130172443975095="` echo /tmp/ansible-tmp-1511885989.72-130172443975095 `" ) && sleep 0'
<127.0.0.1> PUT /tmp/tmpHLGZXF TO /tmp/ansible-tmp-1511885989.72-130172443975095/command.py
<127.0.0.1> EXEC /bin/sh -c 'setfacl -m u:erpnext:r-x /tmp/ansible-tmp-1511885989.72-130172443975095/ /tmp/ansible-tmp-1511885989.72-130172443975095/command.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'sudo -H -S -n -u erpnext /bin/sh -c '"'"'echo BECOME-SUCCESS-bjxfkuzfijpjyexhebptgjbpzxxgcfgl; /bin/python /tmp/ansible-tmp-1511885989.72-130172443975095/command.py'"'"' && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /tmp/ansible-tmp-1511885989.72-130172443975095/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
"changed": true,
"cmd": [
"cp",
"-R",
"/tmp/.bench",
"/home/root/.bench"
],
"delta": "0:00:00.026888",
"end": "2017-11-28 10:19:49.861506",
"failed": true,
"invocation": {
"module_args": {
"_raw_params": "cp -R /tmp/.bench /home/root/.bench",
"_uses_shell": false,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"warn": true
}
},
"rc": 1,
"start": "2017-11-28 10:19:49.834618",
"stderr": "cp: cannot create directory ‘/home/root/.bench’: No such file or directory",
"stderr_lines": [
"cp: cannot create directory ‘/home/root/.bench’: No such file or directory"
],
"stdout": "",
"stdout_lines": []
}
to retry, use: --limit @/tmp/.bench/playbooks/production/install.retry
PLAY RECAP *********************************************************************
localhost : ok=54 changed=5 unreachable=0 failed=1
What is interesting is if I remove the --user erpnext
from the command line, then it defaults to frappe
user, creates the /home/frappe
directory and I get the same error message.
If I create the /home/root
directory with
sudo install -m 705 -o erpnext -g erpnext -d /home/root
and then run the original install command line with --user erpnext
in it. Then everything is installed into the /home/root
directory and not in /home/erpnext
as I would expect. I am thinking this is a bug in the easy install script. Any other thoughts?
I means it works, but not how I would expect it to. A admin would just need to remember that it is in /home/root
and not /home/erpnext
in this example.