-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker.yml
executable file
·41 lines (40 loc) · 987 Bytes
/
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
---
- hosts: kavin
tasks:
- name: install yum Utilities
yum:
name: yum-utils
state: latest
- name: adding repos
get_url:
url: https://download.docker.com/linux/centos/docker-ce.repo
dest: /etc/yum.repos.d/docker-ce.repo
become: yes
# - name: Enable dokcer edge
# ini_file:
# dest: /etc/yum.repos.d/docker-ce.repo
# section: 'docker-ce-edge'
# option: enabled
# value: 0
# become: yes
# - name: Enable Docker Test repo
# ini_file:
# dest: /etc/yum.repos.d/docker-ce.repo
# section: 'docker-ce-test'
# option: enabled
# value: 0
# become: yes
- name: yum Update
yum:
name: '*'
state: present
- name: install docker-ce
yum:
name: docker-ce
state: latest
become: yes
- name: start docker service
service:
name: docker
state: started
enabled: yes