geerlingguy / ansible-role-docker

Ansible Role - Docker
https://galaxy.ansible.com/geerlingguy/docker/
MIT License
1.81k stars 854 forks source link

Fix package downgrading for non-{RedHat,Debian} systems #352

Closed amotl closed 2 years ago

amotl commented 2 years ago

Dear @adamantike,

thank you very much for your report at #346:

Root cause is #336, as the introduced parameter allow_downgrade is not supported by the pacman manager module, so that using Ansible >= 2.12 on Arch Linux would croak like:

Unsupported parameters for (ansible.legacy.pacman) module: allow_downgrade.

I feel responsible for that regression, because I just had focussed on Debian and apparently completely missed the big picture. Apologies.

I am submitting this patch to improve the situation as a draft, because I haven't been able to test it hands-on yet. Do you think it would resolve the issue for you? Apparently, as the software tests seem to succeed, can I humbly ask you to give it a try and report back about the outcome?

In order to pull the patched recipe directly from the git repository, you would put something along those lines into your requirements.yaml file.

roles:
  - name: ansible-role-docker
    src: git+https://github.com/crate-workbench/ansible-role-docker.git
    version: "amo/allow-downgrades-debian-redhat-only"

With kind regards, Andreas.

RealOrangeOne commented 2 years ago

Tested working correctly with ansible 2.12.5:

TASK [geerlingguy.docker : Install Docker (Ansible <2.12).] *********************************************************************************************
ok: [xxxx]

TASK [geerlingguy.docker : Install Docker (Ansible >=2.12).] ********************************************************************************************
skipping: [xxxx]

Clearly picks the <2.12 version

amotl commented 2 years ago

Dear Jeff,

I know your time is scarce. Can I still humbly ask you to bring in this patch and cut another release? It will fix #346, so the Arch Linux users from the community, like @adamantike and @RealOrangeOne, will be grateful.

Thank you very much in advance for taking the time and apologies for the hiccup introduced by my recent patch #336.

With kind regards, Andreas.

amotl commented 2 years ago

Thank you very much!