This is a simple role for Debian that will Install docker-ce from the official APT repo + docker-compose + a cron to cleanup old images.
Add this to requirements.yml:
- src: https://github.com/angristan/ansible-base
name: angristan.base
version: vX.X.X---
- hosts: myhost
roles:
- { role: docker, tags: docker }See my other Ansible roles at angristan/ansible-roles.