ahembree / ansible-hms-docker

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

Failed to install docker-compose #79

Closed joelanguera closed 3 months ago

joelanguera commented 3 months ago

OS: Ubuntu 24.04 LTS Ansible: core 2.17.1 Docker: 26.1.4

Just a fresh Ubuntu 24.04 Server installation, just ran: sudo apt install git make python3-pip -y sudo pip3 install ansible sudo mv /usr/lib/python3.12/EXTERNALLY-MANAGED /usr/lib/python3.12/EXTERNALLY-MANAGED.old Then cloned the repo, configured and make apply It fails on: TASK [galaxy-roles/geerlingguy.pip : Ensure pip_install_packages are installed.] It is able to install docker but fails to install docker-compose Looks like there is a issue with the PyYAML version used [5.4.1] and the installation of docker-compose.

I managed to get the docker-compose installed by manually installing an older version of PyYAML. Then removed the docker-compose installation from the playbook and the run finally succeeded.

ahembree commented 3 months ago

This appears to be an issue with the geerlingguy.pip package, which is not managed by this repo. There's an open issue for Ubuntu 24.04 LTS: https://github.com/geerlingguy/ansible-role-pip/issues/66

The above page will then lead you here, so try the steps here: https://github.com/geerlingguy/ansible-role-pip/issues/57

joelanguera commented 3 months ago

It is a different issue, there is the issue regarding the This environment is externally managed which happens with the installation of docker, as it's the first package to install, but then it also fails on the docker-compose installation due to incompatibility with the PyYAML version used.. Closing this now though as it's not related with this repo. Thanks!

joelanguera commented 3 months ago

Looks like the long term fix would be to use docker compose v2 instead of the old docker-compose v1. I do not know the implications of using one vs the other and if it should be considered in this repo, the other one "geerlingguy/ansible-role-pip" or both

joelanguera commented 3 months ago

You can actually just remove the docker-compose installation from pip_install_packages on hms-docker.yml and the run goes fine. (I only had plex, sonarr and radarr though)

ahembree commented 3 months ago

I switched the ansible compose module to the docker_compose_v2 module a while ago, so I'll look into if the pip package is still needed or not, thanks for digging into it!

KnuffigerMaxi commented 2 months ago

pls fix

ahembree commented 2 months ago

The docker-compose pip dependency has been fixed in https://github.com/ahembree/ansible-hms-docker/pull/81

Please run git pull to pull the latest version