ahembree / ansible-hms-docker

Ansible playbook for automated home media server setup
GNU General Public License v3.0
411 stars 52 forks source link

The workbook doesn't deploy on Ubuntu 24.04 (fresh install) #84

Closed xavpitz closed 3 months ago

xavpitz commented 3 months ago

Hello,

I installed a fresh Ubuntu Server 24.04. I followed each step in the documentation. I configured custom traefik & transmission config files (Yaml syntax was not OK at the 1st shot but I got that fixed & double checked) Now the "make check" works without any issue but the "make apply" fails with some pip / pip_install_packages error message. It seems thats the current version of the workbook has a problem with a default Ubuntu 24.04 fresh install. I'm not good enough at understanding ansible / yaml syntax yet to fix this (I tried :) )

This is why I am reporting this issue.

Keep up the great work !

TASK [galaxy-roles/geerlingguy.docker : include_tasks] ***** skipping: [localhost]

TASK [galaxy-roles/geerlingguy.docker : Get docker group info using getent.] *** skipping: [localhost]

TASK [galaxy-roles/geerlingguy.docker : Check if there are any users to add to the docker group.] ** skipping: [localhost]

TASK [galaxy-roles/geerlingguy.docker : include_tasks] ***** skipping: [localhost]

TASK [galaxy-roles/geerlingguy.pip : Get python3 version installed] **** skipping: [localhost]

TASK [galaxy-roles/geerlingguy.pip : Remove EXTERNALLY-MANAGED] **** skipping: [localhost]

TASK [galaxy-roles/geerlingguy.pip : Ensure Pip is installed.] ***** ok: [localhost]

TASK [galaxy-roles/geerlingguy.pip : Ensure pip_install_packages are installed.] *** failed: [localhost] (item={'name': 'docker'}) => {"ansible_loop_var": "item", "changed": false, "cmd": ["/usr/bin/pip3", "install", "docker"], "item": {"name": "docker"}, "msg": "\n:stderr: error: externally-managed-environment\n\n× This environment is externally managed\n╰─> To install Python packages system-wide, try apt install\n python3-xyz, where xyz is the package you are trying to\n install.\n \n If you wish to install a non-Debian-packaged Python package,\n create a virtual environment using python3 -m venv path/to/venv.\n Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make\n sure you have python3-full installed.\n \n If you wish to install a non-Debian packaged Python application,\n it may be easiest to use pipx install xyz, which will manage a\n virtual environment for you. Make sure you have pipx installed.\n \n See /usr/share/doc/python3.12/README.venv for more information.\n\nnote: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.\nhint: See PEP 668 for the detailed specification.\n"}

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

make: *** [Makefile:49: apply] Error 2 root@xxYYYYYY:~/ansible-hms-docker# client_loop: send disconnect: Broken pipe

ahembree commented 3 months ago

Thanks for the report, unfortunately Ubuntu 24.04 is not currently supported. A dependency this project uses to install requirements is causing the install failure and I am unable to resolve the issue myself.

xavpitz commented 3 months ago

FYI, I managed to get it deploy on Ubuntu 24.04... I asked my dear friend ChatGPT how I could fix this. --> https://chatgpt.com/share/98e4f863-8a5b-4f92-8faa-0fa9fff6eeca

I followed every single step. Most tricky part was to modify the end of the ./galaxy-roles/geerlingguy.pip/tasks/main.yml file.

I replaced the whole last block as I was told to do so by ChatGPT (and had to adapt the /home/yourusername)

It is probably a dirty workaround but I wanted to share it with you so that you may get a better sense of what needs to be done to maybe get it natively Ubuntu 24.04 compatible one day.

Keep up the great work !

ahembree commented 3 months ago

Thank you for looking into it!

I've been doing some testing and I think I can actually remove the dependency that's failing on Ubuntu 24.04. I believe it (the python docker pip package) was required previously but not needed in newer versions of Ansible.

The GitHub Action just ran and was successful after removing the dependency, so I hope to merge it into main here soon

ahembree commented 3 months ago

Should now be resolved with PR https://github.com/ahembree/ansible-hms-docker/pull/85