-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RHEL, role fails to remove "pre-docker-ce" packages #92
Comments
Could you run the following command on the machine you are targeting: I think the mechanism I once added to avoid it to remove pre CE everytime might not work as expected. I will spin up a Redhat again next week to see if it works for me or not. Just as a note, I am planning to remove this removal feature of pre Docker CE in next major release of this role. Cheers! |
Sorry for my last comment about running the docker version command. Could you run the playbook with |
Another debugging info, in
that is set to False even though it should not:
|
Changing code to the following fixes the issue:
The main reason - Ansible doesn't do proper "if" of "True and not False" or "True and True" and simply treats them as strings. |
Btw, another search shall be done to determine whether it's a community edition or not. It simply doesn't show suffix
|
Also, when deleting old versions, the plugins shall be deleted also:
adding |
Thanks @sfuerte! Cheers! |
Just want to let you know that I have done some fixes on master for this. I quickly tested it on RHEL 7 yesterday so would be great if you could test it too. Cheers! |
@haxorof, thanks for the update and fix. Will try it whenever I have another instance with RHEL and older docker on it. The current ones are all have latest already and in use. The only question is about this line
Are sure that it's correct? Gives an error:
As you per https://docs.docker.com/engine/reference/commandline/version/, believe you want to have
or even this |
@sfuerte Thanks! Let me know of the result when you get a hold of another instance with old docker on. Regarding the strange syntax with curly brackets is a way to ensure that Ansible do not interpret the Cheers! |
A playbook is set to detect and remove old Docker packages:
A target system, i.e. Ansible client, has the following Docker packages installed:
When running the playbook, it fails to detect the old package and consecutively fails to install
docker-ce
:Environment
Server OS version is the same on Ansible master and client.
The text was updated successfully, but these errors were encountered: