You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am writing a playbook and running it several times, so Docker is alreay installed on my target machine.
In the playbook, other then ansible-docker I have another role to update packages. So Docker (I am using the ce edition) has been installed and automatically upgraded to 18.03.1 from channel stable:
$ dpkg -l 'docker*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii docker-ce 18.03.1~ce-0 amd64 Docker: the open-source applicati
When I execute the playbook I get the following error:
TASK [ansible-docker : Install Docker]
*****************************************
fatal: [host]: FAILED! =>
{"cache_update_time": 1524950924, "cache_updated": false, "changed": false,
"msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o
\"Dpkg::Options::=--force-confold\" install 'docker-
ce=18.03.0~ce-0~ubuntu' -o APT::Install-Recommends=no' failed: E: Packages
were downgraded and -y was used without --allow-downgrades.\n", "rc": 100,
"stderr": "E: Packages were downgraded and -y was used without --allow-
downgrades.\n", "stderr_lines": ["E: Packages were downgraded and -y was used
without --allow-downgrades."], "stdout": "Reading package lists...\nBuilding
dependency tree...\nReading state information...\nRecommended packages:\n
aufs-tools cgroupfs-mount | cgroup-lite pigz\nThe following packages will be
DOWNGRADED:\n docker-ce\n0 upgraded, 0 newly installed, 1 downgraded, 0 to
remove and 0 not upgraded.\n", "stdout_lines": ["Reading package lists...",
"Building dependency tree...", "Reading state information...", "Recommended
packages:", " aufs-tools cgroupfs-mount | cgroup-lite pigz", "The following
packages will be DOWNGRADED:", " docker-ce", "0 upgraded, 0 newly installed,
1 downgraded, 0 to remove and 0 not upgraded."]}
I am not even sure that this is a "proper" bug of this ansible role and I am not sure what should be the most reasonable expected behavior in this case. I am reporting it just to point out this behavior.
The text was updated successfully, but these errors were encountered:
Currently Ansible doesn't support the --allow-downgrades option. Technically you could get around this by using force: True on the task that installs the package but I'm not sold on doing that.
In the mean time, the quickest way to get around this would be to run sudo apt-get remove --purge docker-ce on the box and then re-run this role.
I also ran into the same problem as described here (see duplicate issue #26). Just an idea: Wouldn't it make sense to take the latest version from the repository as long as the variables docker_version and docker_compose_version are not set actively. At least this is what I naively expected 🤕
I am writing a playbook and running it several times, so Docker is alreay installed on my target machine.
In the playbook, other then ansible-docker I have another role to update packages. So Docker (I am using the
ce
edition) has been installed and automatically upgraded to18.03.1
from channel stable:This is my playbook configuration:
When I execute the playbook I get the following error:
I am not even sure that this is a "proper" bug of this ansible role and I am not sure what should be the most reasonable expected behavior in this case. I am reporting it just to point out this behavior.
The text was updated successfully, but these errors were encountered: