From ec6d8398f0cb2783eb5a161dee27ec28247b38b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 20 Jun 2024 23:07:59 +0200 Subject: [PATCH] ci: Install python3 packages from the distro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There's no need to use PIP, at all, as we can rely on the packages with the correct versions coming from the distro. This is Ubuntu specific, but it doesn't add a new technical debt, it just keeps the same technical debt we already had. Signed-off-by: Fabiano FidĂȘncio --- tests/e2e/ansible/start_docker_registry.yaml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/tests/e2e/ansible/start_docker_registry.yaml b/tests/e2e/ansible/start_docker_registry.yaml index 802042b6..3aea8fd0 100644 --- a/tests/e2e/ansible/start_docker_registry.yaml +++ b/tests/e2e/ansible/start_docker_registry.yaml @@ -12,24 +12,16 @@ local_registry_port: 5000 local_registry_name: local-registry tasks: - - name: Install pip3 + - name: Install python3-docker and python3-requests package: - # TODO: this is ubuntu specific... - name: python3-pip - state: present - retries: 3 - delay: 10 - # The docker and requests pip packages are required by the docker_container ansible module itself. - # The requests package is pinned to a version less than 2.32 to avoid a bug - # at https://github.com/docker/docker-py/issues/3256 - - name: Install docker and requests pip packages - pip: name: - - docker - - requests<2.32 + # This is Ubuntu specific + - python3-docker + - python3-requests state: present retries: 3 delay: 10 + when: ansible_distribution == "Ubuntu" - name: Start a docker registry docker_container: name: "{{ local_registry_name }}"