Hi flex2sky
Sorry not to reply earlier - have been snowed under. That fail2ban problem is NEW.
I always install on a fresh copy of Ubuntu Server. The repos for 23.10 install python 3.11 & for 24.04 that’s 3.12. Starting in 3.11 there’s now a requirement to use a venv when installing stuff - otherwise “sudo pip3 install frappe-bench” should give “error: externally-managed-environment”
See: python - pip install -r requirements.txt is failing: "This environment is externally managed" - Stack Overflow
and: PEP 668 – Marking Python base environments as “externally managed” | peps.python.org
/usr/lib/python3.12/EXTERNALLY-MANAGED is just an empty marker file and removing it causes Python to revert to the way it behaves in 3.10. I included this after reading installs like: Installing ERPNext version 15 on Ubuntu 23+
That said - I now see it’s a very ham-fisted way for production. Years down the track you may end up with multiple incompatible versions of Python all over your drive. I’m not experienced with venv - so I’ll try a deep dive into pipx & learn how to use that.
With regards fail2ban - I just did an install (24.04) - after “$ bench setup role fail2ban” you get:
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.12/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.
From Ansible’s site: ansible.builtin.include – Include a play or task list — Ansible Documentation … “we are looking at deprecating it in the near future.” That was 2.10 & they appear coy in updating their docs. But see: ansible.builtin.include has been Removed in Ansible version 2.16 · Issue #389 · ansible-ThoTeam/nexus3-oss · GitHub
And with the install I just did I’ve got:
bower@erpdemo:~/frappe-bench$ ansible --version
ansible [core 2.16.7]
I’ll can check install logs at work tomorrow. I didn’t get an error last time I installed on 24.04. I’ll also try to flesh out that node vs nodejs issue.