We used a similar local role here, in the Freifunk Magdeburg project,
and in personal playbooks. That was moved to an external project,
unified, and reworked, so the external role can act as replacement for
the distributed, redundant copies.
Link: https://github.com/netz39/ansible-role-host-docker
To install docker on a host you have to put it into that group in
inventory now, instead of adding the role to each host playbook. Idea
is to extend the group docker_host playbook by more docker related
things as for example metrics and monitoring.