Ansible_workstation/tasks/docker.yml

35 lines
757 B
YAML
Raw Normal View History

2018-08-28 07:54:56 +00:00
---
- name: Remove depot docker version
apt:
name: "{{ item }}"
state: absent
with_items:
- docker
- docker-engine
- docker.io
- name: Install tool to use apt with https
apt:
name: "{{ item }}"
state: present
with_items:
- apt-transport-https
- ca-certificates
- name: Add Docker apt key.
apt_key:
2018-08-28 08:05:08 +00:00
url: curl -fsSL https://download.docker.com/linux/debian/gpg
2018-08-28 07:54:56 +00:00
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
state: present
- name: Add Docker repository.
apt_repository:
2018-08-28 08:05:08 +00:00
repo: deb [arch=amd64] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable
2018-08-28 07:54:56 +00:00
state: present
update_cache: yes
- name: Install docker-ce
apt:
name: docker-ce
state: present