-
Notifications
You must be signed in to change notification settings - Fork 0
/
Docker-install.yml
42 lines (42 loc) · 1 KB
/
Docker-install.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
---
- hosts: all
become: true
tasks:
- name: installa dipendenze
apt:
name: "{{item}}"
state: present
update_cache: yes
loop:
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- software-properties-common
- name: aggiungi chiave GPG
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
- name: aggiungi repository docker
apt_repository:
repo: deb https://download.docker.com/linux/ubuntu bionic stable
state: present
- name: installa docker
apt:
name: "{{item}}"
state: latest
update_cache: yes
loop:
- docker-ce
- docker-ce-cli
- containerd.io
- name: assicurati che docker sia attivo
service:
name: docker
state: started
enabled: yes
handlers:
- name: restart docker
service:
name: docker
state: restarted