Skip to content

Commit

Permalink
ci: Install python3 packages from the distro
Browse files Browse the repository at this point in the history
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 <fabiano.fidencio@intel.com>
  • Loading branch information
fidencio committed Jun 21, 2024
1 parent a24718c commit ec6d839
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions tests/e2e/ansible/start_docker_registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down

0 comments on commit ec6d839

Please sign in to comment.