haxorof/ansible-role-docker-ce

Pip install on RHEL 7 and 8

janorn opened this issue · 8 comments

Version Information

Ansible: 2.9.9
Role: 3.0.0

Actual Behavior

TASK [haxorof.docker_ce : Fail if Docker SDK/Stack/Compose shall be installed using PiP on RedHat]
fatal: [host]: FAILED! => {"changed": false, "msg": "This role does not handle packages coming from PiP!"}

New/Changed Behavior

RHEL7 has python3-pip
RHEL8 has python2-pip and python3-pip

RFC

Please retest installing pip on RHEL8 and perhaps RHEL7

I will have a look on why I added that block for RHEL but I think I got big problems. Could check what happens now if I just remove that assert and run through my regression tests.

I was looking back on the issues I got with RHEL and you can find more information in another ticket I wrote when investigating this: #97

What exactly do you want to install of it and what is it that you want to do in the end? If you only want to have docker-compose command line then that is easy to just fetch the binary directly from github.

Aha, I think that will be a bit hard for me to fix with this role since installation of python pip is different compared to all other distributions what I know now where you need to install scl and activate the python environment using that.

Have you tried yourself just to install pip and Docker SDK manually? Would suggest you to do that first to try. Note also that Docker CE is not officially supported on RHEL.

Depending on requirements then Podman (podman.io) might be an better option than Docker CE.

python2-pip is available in epel on rhel7
python3-pip is available in Updates on rhel7

Both are available in rhel8. My testing indicates pip3 being used.

That is as packages. No need for scl.

We use docker already so its not time to divert. We might investigate podman or even go kubernetes in the future.

Aha thanks, I will then just try to remove the assert I have then and run a the test suite since the role itself already supports python 2 and python 3 install.

Probably will do it some time during the weekend.

Cheers!

I started a smaller regression test one hour ago without the assert and I have some good news.
Obviously RedHat has changed things since I tested this one year ago so now it worked directly and the only thing I did was to remove the "block" I have made with the assert. 😄

Will do another fix too before doing a release.