forked from jonashackt/gitlab-ci-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prepare-docker-ubuntu.yml
43 lines (36 loc) · 935 Bytes
/
prepare-docker-ubuntu.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
---
- name: Add Docker apt key
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
state: present
ignore_errors: true
- name: Add docker apt repo
apt_repository:
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ansible_lsb.codename}} stable"
update_cache: yes
become: true
- name: Install Docker apt package
apt:
pkg: docker-ce
state: latest
update_cache: yes
become: true
- name: Ensure Docker service is installed and restarted
service:
name: docker
state: restarted
enabled: yes
- name: Install pip
apt:
name: python3-pip
state: latest
- name: Install Docker Compose
pip:
name: docker-compose
- name: Add vagrant user to docker group.
user:
name: vagrant
groups: docker
append: yes
become: true