22 lines
570 B
YAML
22 lines
570 B
YAML
|
- 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
|