geerlingguy / ansible-role-docker

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

Allow change obsolete packages #463

Closed elsoa-invitech closed 2 months ago

elsoa-invitech commented 2 months ago

There are some reason (religion, company policy) to force install package from distribution. We can done that with right parameters (ubuntu 22.04):

- name: Include geerlingguy.docker role
  ansible.builtin.include_role:
    name: geerlingguy.docker
  vars:
    docker_add_repo: false
    docker_packages:
      - docker.io
      - containerd
    docker_compose_package: docker-compose-v2
    docker_obsolete_packages: []

But the role want to remove old versions of Docker, and this remove the distrib packages too.

This patch allow change the list of package to remove.