frappe / bench

CLI to manage Multi-tenant deployments for Frappe apps
https://frappeframework.com/docs/user/en/bench
GNU General Public License v3.0
1.37k stars 1.2k forks source link

Error on Bench setup for Production #1575

Closed fmir864 closed 1 month ago

fmir864 commented 1 month ago

Description of the issue

Getting below message when trying to run sudo bench setup production [frappe-user]:

Context information (for bug reports)

Trying to install ERPNext on a Ubuntu 22.04 LTS Virtual Machine running on Windows 11 Oracle Virtual Box

Output of bench version

erpnext 15.33.0
frappe 15.38.0
hrms 15.25.2
payments 0.0.1

Steps to reproduce the issue

  1. Follow this guide and go up to step 7.3
  2. Run sudo bench setup production [frappe-user]

Observed result

ERROR! [DEPRECATED]: ansible.builtin.include has been removed. Use include_tasks or import_tasks instead. This feature was removed from ansible-core in a release after 2023-05-16. Please update your playbooks.

Expected result

Success message like;

ok: [localhost]

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

Setting Up supervisor...
Setting Up NGINX...
Port configuration list:

Site erpnext.local assigned port: 80
Setting Up symlinks and reloading services...
$ sudo /usr/sbin/nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
$ sudo systemctl reload nginx

Stacktrace / full error message

ERROR! [DEPRECATED]: ansible.builtin.include has been removed. Use include_tasks or import_tasks instead. This feature was removed from ansible-core in a release after 2023-05-16. Please update your playbooks.

The error appears to be in '/usr/local/lib/python3.10/dist-packages/bench/playbooks/roles/mariadb/tasks/main.yml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---
- include: centos.yml
  ^ here
ERROR: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-vvvv', '-e', '{"production": true, "admin_emails": "", "mysql_root_password": null, "container": false}', '-t', 'fail2ban']' returned non-zero exit status 1.

Additional information

Related question and answer here

cogk commented 1 month ago

The bug has been fixed in https://github.com/frappe/bench, but I guess it has not yet been released on PyPI.

cc @akhilnarang

akhilnarang commented 1 month ago

Had some issues, but its now released on PyPI as frappe-bench v5.22.8