This is a role that will install the Docker CE engine and docker-compose from the official APT repo and perform the post-installation steps on a Ubuntu target
Add this to requirements.yml:
- src: https://github.com/nir3shprabu/ansible-role-docker
name:
version: v<latest-release>
- name: "install docker"
hosts: enter your hosts file
become: yes
role:
- ansible-role-docker