Update file main.yml

This commit is contained in:
Administrator 2025-10-10 16:07:30 +00:00
parent 66dcbe6c3a
commit aac697dddd

View File

@ -0,0 +1,32 @@
---
- 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