-
Notifications
You must be signed in to change notification settings - Fork 31
/
main.yaml
49 lines (42 loc) · 1022 Bytes
/
main.yaml
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
- name: Install dependencies
apt:
force_apt_get: yes
name:
- gnupg2
- software-properties-common
- name: Add Docker apt key
apt_key:
url: https://download.docker.com/linux/raspbian/gpg
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
- name: Add Docker apt repository
apt_repository:
repo: deb https://download.docker.com/linux/raspbian {{ ansible_distribution_release }} stable
filename: docker
- name: Install Docker
apt:
force_apt_get: yes
name:
- docker-ce:armhf
- python3-setuptools
- python3-pip
install_recommends: no
- name: Install Docker SDK for python
pip:
name: docker
- name: Add user to docker group
user:
name: "{{ ansible_user }}"
append: yes
groups: docker
- name: Enable Docker IPv6
copy:
dest: /etc/docker/daemon.json
mode: 0600
content: |
{
"ipv6": true,
"fixed-cidr-v6": "2001:db8:1::/64"
}
notify: Restart Docker
- name: Flush handlers
meta: flush_handlers