This installation is based on instruction of Docker official website
The install included 3 files:
daemon.json which is used to custom docker service settings. You can get a complete daemon.json configure here
override.conf is used to configure remote access to docker
ansible-nodes is list of node (ubuntu 18.04, or 20.04) that you want install docker to. You must update this with your env.
To run the installation make sure you have all files on the same folder with the play-book yaml
This script assume you already configure access from your ansible host to your nodes:
ansible-playbook -i ansible-nodes instdocker-play.yml --ask-become-pass