1
0
Fork 0
home-stack-ansible/roles/docker/tasks/main.yml

22 lines
570 B
YAML
Raw Normal View History

2024-01-21 02:59:46 +00:00
- name: Download docker repository gpg key
get_url:
url: https://download.docker.com/linux/ubuntu/gpg
dest: /usr/share/keyrings/docker.asg
- name: Add docker repository
apt_repository:
repo: deb [arch=amd64 signed-by=/usr/share/keyrings/docker.asg] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable
- name: Install docker
apt:
update_cache: true
name:
- docker-ce
- docker-ce-cli
- python3-docker
- name: Enable docker service
systemd:
name: docker
state: started
enabled: yes