34 lines
712 B
YAML
34 lines
712 B
YAML
---
|
|
- name: install dependencies packages
|
|
apt:
|
|
name: '{{ packages }}'
|
|
vars:
|
|
packages:
|
|
- apt-transport-https
|
|
- ca-certificates
|
|
- gnupg2
|
|
- software-properties-common
|
|
- python3-docker
|
|
- python-docker
|
|
tags: docker
|
|
|
|
- name: add gpg key for docker repository
|
|
apt_key:
|
|
url: https://download.docker.com/linux/debian/gpg
|
|
tags: docker
|
|
|
|
- name: add docker repository
|
|
apt_repository:
|
|
repo: 'deb https://download.docker.com/linux/debian {{ docker_repo_distribution }} stable'
|
|
tags: docker
|
|
|
|
- name: install docker package
|
|
apt:
|
|
name: docker-ce
|
|
tags: docker
|
|
|
|
- name: enable and start service
|
|
systemd:
|
|
name: docker
|
|
state: started
|
|
tags: docker
|