Ubuntu 18.04 easy install

PLAY RECAP ***********************************************************************************************************************************************************************************************************************************************
localhost : ok=45 changed=30 unreachable=0 failed=1 skipped=67 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 413, in
File “install.py”, line 135, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 327, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 190, 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=ubuntu’]’ returned non-zero exit status 2


Could you provide other logs? Usually, the cause of this error can be found on the upper part.



Actually, the error is right there. The ansible server cannot be started.

I have posted a few times about this, Try and run the complete ansible command minus the quotes and commas on the command line on its own. This might give you a good indication on why ansible cannot start.

subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=ubuntu’]’

ansible-playbook -c local site.yml -vvvv ....

The command above is incomplete, but hopefully you get the idea

This can happen if you created the user ubuntu already.

Try running the easy install without creating the erpnext user (in your case ubuntu).

Easy install will create this user for you.

After the installation is done, you can proceed to do

 sudo usermod -aG sudo ubuntu

and also give ubuntu its password

 sudo passwd ubuntu