haxorof/ansible-role-docker-ce

Version 3.3.0 forces pip upgrades on RHEL8

janorn opened this issue · 5 comments

Version Information

Ansible: 2.9.0
Role: 3.3.0

Steps to Reproduce

Add following vars:

docker_additional_packages_pip: 
  - "some_pip_pkg"
docker_x_fix_no_zipp_module: false

To your play.

Expected Behavior

Install pip packages with current pip.

Actual Behavior

Forces an upgrade of pip

References

- name: Set PiP to be upgraded due to Rust depencency for cryptography
set_fact:
docker_pip_upgrade: true
when:
- _docker_python3 | bool
- (_pip_version.stdout_lines[0] | regex_replace('^pip\s(\d+\.\d+).+$', '\\1')) is version('21.0', '<')

This upgrade of pip was added recently since docker-compose install fails due to new rust dependency added in cryptography library.

What kind of issues does this cause for you?

We don't use docker-compose. And really prefer to keep pip managed by the OS supported repository.

Which library is required?

docker-compose depends on library cryptography and they added Rust as dependency now which requires upgraded pip version or sometimes cargo library to be installed depending on OS.

Rust dependency is written in the install instructions: https://cryptography.io/en/latest/installation.html

What I can do to introduce one variable for this role to prevent any upgrades of pip if you want? Then you can set that instead of: docker_x_fix_no_zipp_module

I will today add an experimental parameter called docker_x_skip_pip_auto_upgrade. This will prevent any PiP upgrade to happen in cases the role see it needs it for some reason. So you can just use that instead of setting docker_x_fix_no_zipp_module.