-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDocker.yml
49 lines (49 loc) · 1.16 KB
/
Docker.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
41
42
43
44
45
46
47
48
49
---
- hosts: docker
tasks:
- name: Update the apt package index
become: yes
apt:
name: "*"
state: latest
update_cache: yes
force_apt_get: yes
- name: Install packages for apt add repository over HTTPS
become: yes
apt:
name: "{{ packagesdep }}"
force_apt_get: yes
state: latest
update_cache: yes
vars:
packagesdep:
- git
- apt-transport-https
- ca-certificates
- wget
- software-properties-common
- gnupg2
- curl
- name: Add Apt signing key from official docker repo
apt_key:
url: https://download.docker.com/linux/debian/gpg
state: present
- name: add docker official repository for Debian Stretch
apt_repository:
repo: deb [arch=amd64] https://download.docker.com/linux/debian stretch stable
state: present
- name: Index new repo into the cache
become: yes
apt:
name: "*"
state: latest
update_cache: yes
force_apt_get: yes
- name: actually install docker
apt:
name:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-compose
state: latest