forked from jonashackt/gitlab-ci-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prepare-gitlab.yml
51 lines (41 loc) · 1.45 KB
/
prepare-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
45
46
47
48
49
50
51
---
- hosts: all
become: true
vars:
gitlab_domain: "gitlab.jonashackt.io"
gitlab_url: "https://{{ gitlab_domain }}"
gitlab_registry_url: "{{ gitlab_url }}:4567"
gitlab_runner_count: 2
gitlab_pages_domain: "pages.jonashackt.io"
gitlab_pages_url: "https://{{ gitlab_pages_domain }}"
tasks:
- name: Update apt
apt:
update_cache: yes
tags: update
- name: Prepare Docker on Linux node
import_tasks: prepare-docker-ubuntu.yml
tags: docker
- name: Prepare Let´s Encrypt certificates for Gitlab, if we setup an internal Server like Vagrant (you have to provide providername, providerusername & providertoken as extra-vars!)
import_tasks: letsencrypt.yml
when: providername is defined
tags: letsencrypt
- name: Install Gitlab on Linux node
import_tasks: install-gitlab.yml
tags: gitlab
- name: Configure Gitlab Container Registry
import_tasks: configure-gitlab-registry.yml
tags: registry
- name: Install & Register Gitlab Runner for Docker
import_tasks: gitlab-runner.yml
tags: runner
- name: Configure Gitlab Pages
import_tasks: pages.yml
tags: pages
- name: Congratulations!
debug:
msg:
- "Your Gitlab instance is ready at {{ gitlab_url }}"
- "The Gitlab Container Registry is waiting for your docker pushes at {{ gitlab_registry_url}}"
- "Gitlab Pages are served at {{ gitlab_pages_url }}"
- "Just open your Browser and login!"