--- - name: Add Docker GPG key apt_key: url: https://download.docker.com/linux/ubuntu/gpg state: present - name: Add Docker repository apt_repository: repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu noble stable" state: present - name: Install Docker packages apt: name: - docker-ce - docker-ce-cli - containerd.io - docker-compose-plugin state: present update_cache: yes - name: Start and enable Docker service systemd: name: docker state: started enabled: yes - name: Add root to docker group user: name: root groups: docker append: yes