Install.py always fails at Add dnsmasq to network config TASK at first run

I’ve discovered a curious bug where install.py will stop at Add dnsmasq to network config:

ERROR! The requested handler 'restart network manager' was not found in either t
he main handlers list nor in the listening handlers list
Traceback (most recent call last):
  File "install.py", line 420, 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
    rause CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'sit
e.yml', '-e', '@/tmp/extra_vars.json', '--become,' '--become-user=erp']' returne
d non-zero exit status 1

Running the command again, install.py runs completely without issues.

I don’t know if it’s related to the OS, but its Ubuntu 18.04.1 LTS where I noticed it happening. Running install.py with either Python 2 or 3 results in the same error.