--- - name: Install required system packages apt: name: - apt-transport-https - ca-certificates - curl - software-properties-common state: latest update_cache: true - name: Add Docker GPG apt Key apt_key: url: https://download.docker.com/linux/ubuntu/gpg state: present - name: Add Docker Repository apt_repository: repo: deb https://download.docker.com/linux/ubuntu jammy stable state: present - name: Update apt and install docker-ce apt: name: - docker-ce - docker-compose state: latest update_cache: true