As described in https://github.com/ansible/ansible/issues/65687, get_url
only partially supports check_mode: "the changed status will reflect
comparison to an empty source file".
Before this change, executing this code, with the key already being in
place on the target system, would report "OK", while check_mode would
report "changed".
Due to this change, both now either report "OK" or "changed", depending
on the state of the target system.
Why:
Without this modification, we can't use docker with docker_users in same
playbook than the one which install docker.
How:
Check that docker_users are set and not in docker group before include
docker-users.yml. In docker-users.yml we call reset_connection from
ansible.builtin.meta collection after docker-users are added to docker
group.
Manual success tests:
* Try to install docker with only one user in docker-users and not in
docker group => docker-users.yml include
* Try to install docker with only one user in docker-users but the user
is in docker group => docker-users.yml not include
* Try to install docker with 2 users in docker-users, one user in docker
group and the second not => docker-users.yml include
* Try to install docker with 2 users in docker-users, both are in docker
group => docker-users.yml not include
* Try to install docker with 2 users in docker-users, both are not in
docker group => docker-users.yml include
Not all package install handlers implement the `allow_downgrade` option.
For example, using Ansible >= 2.12 on Arch Linux would croak like:
Unsupported parameters for (ansible.legacy.pacman) module: allow_downgrade.
For the "package" task, add "allow_downgrade: true" to support this
scenario.
Because this option is only available starting with `ansible-core>=2.12`
for apt-based systems, we need conditional dispatching here.
yaml: truthy value should be one of [false, true] (truthy)
roles/geerlingguy.docker/tasks/docker-compose.yml:5
Fixesgeerlingguy/ansible-role-docker#325