-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathinstall-gitlab.yml
46 lines (37 loc) · 1.16 KB
/
install-gitlab.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
---
# See https://about.gitlab.com/installation/#ubuntu for the installation docs
# all the necessary steps are executed in this script here
- name: Install curl, openssh-server, ca-certificates & postfix
apt:
name:
- curl
- openssh-server
- ca-certificates
- postfix
state: latest
- name: Add the GitLab package repository
shell: "curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash"
- name: Update apt
apt:
update_cache: yes
- name: Install Gitlab with Omnibus-Installer
apt:
name: gitlab-ce
state: latest
environment:
EXTERNAL_URL: "{{gitlab_url}}"
ignore_errors: true
register: gitlab_install_result
- name: Gitlab Omnibus is based on Chef and will give many insight, what it does in the background
debug:
msg:
- "The installation process said the following: "
- "{{gitlab_install_result.stdout_lines}}"
- name: Wait for Gitlab to start up
wait_for:
port: 443
delay: 10
sleep: 5
- name: Let´s check, if Gitlab is up and running
uri:
url: "{{gitlab_url}}"