forked from crunchy-devops/jenkins-pic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
53 lines (46 loc) · 1.12 KB
/
playbook.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
---
- name: Install Docker
hosts: all
become: true
tasks:
- name: upgrade all packages
yum:
name: '*'
state: latest
exclude: kernel*
- name: Add package epel-release
yum:
name:
- epel-release
state: present
- name: Install packages needed for docker and its ecosystem
yum:
name:
- yum-utils
- device-mapper-persistent-data
- lvm2
- python3
- python3-pip
- htop
- iotop
- iftop
state: present
- name: Set up a stable docker repository
command: yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
- name: Install docker packages
yum:
name:
- docker-ce
- docker-ce-cli
- containerd.io
state: present
- name: start service
service:
name: docker
state: started
- name: Enable docker service
service:
name: docker
enabled: yes
- name: Set current user to docker group
command: usermod -aG docker centos