Closed fardke closed 2 years ago
I had tried using that meta
trick before but never could get it to pick things up in a playbook run over SSH correctly... maybe it was a bug in Ansible that's fixed now?
Hello,
I never try to use meta reset_connection
before, but on ansible core 2.13.3 it works directly.
Some issues are closed on ansible related to this :
Two issues seems to be fixed.
Heh, I even wrote an article on this: https://www.jeffgeerling.com/blog/2021/allowing-ansible-playbooks-work-new-user-groups-on-first-run
Linked issues:
Why:
Without this modification, we can't use docker in same playbook than the one which install docker (in the case of we use
docker_users
variable).How:
Check that
docker_users
are set and not in docker group before includedocker-users.yml
. Indocker-users.yml
we call reset_connectionfrom [ansible.builtin.meta](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/meta_module.html) collection after
docker_users` are added to docker group.Manual success tests: