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 <[email protected]>
  • Loading branch information
fidencio committed Jun 20, 2024
1 parent 0c4343d commit d6143e8
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 @@ -11,25 +11,17 @@
local_registry_port: 5000
local_registry_name: local-registry
tasks:
- name: Install pip3
- name: Install python3-docker and python3-requests
become: yes
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-request
state: present
retries: 3
delay: 10
when: when: ansible_distribution == "Ubuntu"
- name: Start a docker registry
docker_container:
name: "{{ local_registry_name }}"
Expand Down

0 comments on commit d6143e8

Please sign in to comment.