blob: 6f0c97c918f7b069bbc84b8b1f4e7f5e98904750 (
plain)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
---
- name: Manage extinct_potato's personal cloud
hosts: all
tasks:
- name: Ensure Python3 is default
become: yes
community.general.alternatives:
name: python
path: /usr/bin/python3
link: /usr/bin/python
- name: Ensure initial prerequisites
become: yes
apt:
update_cache: yes
pkg:
- git
- apt-transport-https
- ca-certificates
- curl
- software-properties-common
- python3-pip
- virtualenv
- python3-setuptools
- python3-docker
- python3-requests
- name: Add Docker GPG key
become: yes
apt_key:
url: https://download.docker.com/linux/debian/gpg
state: present
- name: Add Docker repository
become: yes
apt_repository:
repo: deb https://download.docker.com/linux/debian buster stable
state: present
- name: Install Docker
become: yes
apt:
update_cache: yes
pkg:
- docker-ce
- docker-ce-cli
- containerd.io
- name: Add the 'debian' user to Docker group
become: yes
user:
name: debian
groups: docker
append: yes
- name: Ensure Docker service is enabled
become: yes
ansible.builtin.systemd:
name: docker
state: started
enabled: yes
- name: Create a network for related containers
community.docker.docker_network:
name: web
|