-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yml
40 lines (35 loc) · 928 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
- name: "docker-ce: Uninstall old version"
apt:
name: "{{item}}"
state: absent
loop:
- "docker"
- "docker-engine"
- "docker-io"
- "containerd"
- "runc"
- name: Install prerequisites for Docker repository
apt:
name:
[
"apt-transport-https",
"ca-certificates",
"curl",
"gnupg2",
"software-properties-common",
]
update_cache: yes
- name: Add Docker GPG key
apt_key: url=https://download.docker.com/linux/ubuntu/gpg
- name: Add Docker APT repository
apt_repository:
repo: deb [arch=amd64] https://download.docker.com/{{ ansible_system | lower }}/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable
- name: Install Docker CE
apt:
name: ["docker-ce", "docker-ce-cli", "containerd.io"]
update_cache: yes
- name: Add vagrant user to docker group
user:
name: vagrant
group: docker