@bkm
The frappe user was not created before running the install script, I’m 100% sure. I have tried to replicate it on the same machine (Lubuntu 18.04 on VirtualBox)
First run was with not existing user like this:
martin@lubu18vb:~$ id -u frappe
id: ‘frappe’: no such user
martin@lubu18vb:~$ sudo python install.py --production --user frappe
Second run was with existing (current) user:
martin@lubu18vb:~$ id -u martin
1000
martin@lubu18vb:~$ sudo python install.py --production --user martin
In both cases I got exactly the same error message I posted above after first run of the script and in both cases I got successful finish with no errors by running install script second time.
I also tried the same procedure on fresh install of ubuntu server 18.04
First run with not existing user frappe:
martin@ubusrv18vb:~$ id -u frappe
id: ‘frappe’: no such user
martin@ubusrv18vb:~$ sudo python install.py --production --user frappe
[sudo] password for martin:
Second run was with existing (current) user:
martin@ubusrv18vb:~$ id -u martin
1000
martin@ubusrv18vb:~$ sudo python install.py --production --user martin
[sudo] password for martin:
Here I got also in both cases identical error message, but different from error from the post above. Running script second time didn’t help here, every next run finished with the same error.
TASK [common : Install prerequisites using apt-get] ****************************
[DEPRECATION WARNING]: Invoking "apt" only once while using a loop via
squash_actions is deprecated. Instead of using a loop to supply multiple items
and specifying `pkg: "{{ item }}"`, please use `pkg: ['dnsmasq', 'fontconfig',
'git', 'htop', 'libcrypto++-dev', 'libfreetype6-dev', 'liblcms2-dev', 'libssl-
dev', 'libwebp-dev', 'libxext6', 'libxrender1', 'libxslt1-dev', 'libxslt1.1',
'libffi-dev', 'ntp', 'postfix', 'python-dev', 'python3-dev', 'python-tk',
'screen', 'vim', 'xfonts-75dpi', 'xfonts-base', 'zlib1g-dev', 'apt-transport-
https', 'libsasl2-dev', 'libldap2-dev', 'libcups2-dev', 'pv']` and remove the
loop. This feature will be removed in version 2.11. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.
failed: [localhost] (item=[u'dnsmasq', u'fontconfig', u'git', u'htop', u'libcrypto++-dev', u'libfreetype6-dev', u'liblcms2-dev', u'libssl-dev', u'libwebp-dev', u'libxext6', u'libxrender1', u'libxslt1-dev', u'libxslt1.1', u'libffi-dev', u'ntp', u'postfix', u'python-dev', u'python3-dev', u'python-tk', u'screen', u'vim', u'xfonts-75dpi', u'xfonts-base', u'zlib1g-dev', u'apt-transport-https', u'libsasl2-dev', u'libldap2-dev', u'libcups2-dev', u'pv']) => {"changed": false, "item": ["dnsmasq", "fontconfig", "git", "htop", "libcrypto++-dev", "libfreetype6-dev", "liblcms2-dev", "libssl-dev", "libwebp-dev", "libxext6", "libxrender1", "libxslt1-dev", "libxslt1.1", "libffi-dev", "ntp", "postfix", "python-dev", "python3-dev", "python-tk", "screen", "vim", "xfonts-75dpi", "xfonts-base", "zlib1g-dev", "apt-transport-https", "libsasl2-dev", "libldap2-dev", "libcups2-dev", "pv"], "msg": "No package matching 'dnsmasq' is available"}
to retry, use: --limit @/tmp/.bench/playbooks/site.retry
PLAY RECAP *********************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=1
Traceback (most recent call last):
File "install.py", line 425, in <module>
install_bench(args)
File "install.py", line 122, in install_bench
run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
File "install.py", line 338, 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', '-e', '@/tmp/extra_vars.json', '--become', '--become-user=martin']' returned non-zero exit status 2
martin@ubusrv18vb:~$