Should also manage docker-ce-cli package with docker-ce
Describe the Bug
For Docker CE packages: when managing the Docker package (docker::manage_package => true) but not setting docker::package_source (i.e. packages are installed from APT or YUM repos available to the system) then the docker-ce-cli package remains unmanaged by Puppet.
This leads to problems when updating the Docker CE packages (i.e. bumping docker::version) down the line, because the docker-ce-cli package remains at the version at which it was originally installed. Thus docker-ce and docker-ce-cli versions drift apart.
This could also be interpreted as a bug in the Docker packages since docker-ce doesn't enforce docker-ce-cli to be installed in the same version (it just depends on any version of docker-ce-cli). Maybe this is intentional?
Expected Behavior
When managing the Docker CE package docker-ce without setting docker::package_source then the CLI package docker-ce-cli should also be managed and set to the same version as the docker-ce package.
Steps to Reproduce
- Enable Docker APT repo
- Install Docker CE by means of puppetlabs-docker
- Bump
docker::version - Observe that
docker-ce-cliremains at the originally installed version whiledocker-ceis bumped to the version specified indocker::version
Environment
- Docker 20.10.x
- puppetlabs-docker 5.0.0
- Ubuntu 20.04, probably also RHEL and others
Additional Context
PRs #740 and #827 deal with this issue but only when docker::package_source is used. The case when packages are installed from system-wide enabled APT (or YUM) repos is left out.