forked from jonashackt/gitlab-ci-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pages.yml
24 lines (19 loc) · 892 Bytes
/
pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
# See https://docs.gitlab.com/ee/administration/pages/index.html#wildcard-domains-with-tls-support
- name: Configure GitLab Pages in /etc/gitlab/gitlab.rb
blockinfile:
path: /etc/gitlab/gitlab.rb
block: |
pages_external_url '{{ gitlab_pages_url }}'
pages_nginx['redirect_http_to_https'] = true
pages_nginx['ssl_certificate'] = "/etc/gitlab/ssl/{{ gitlab_pages_domain }}.crt"
pages_nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/{{ gitlab_pages_domain }}.key"
marker: "# {mark} ANSIBLE MANAGED BLOCK: GitLab Pages configuration"
- name: Reconfigure Gitlab to activate GitLab Pages
shell: "gitlab-ctl reconfigure"
register: reconfigure_result
- name: Let´s see what Omnibus/Chef does
debug:
msg:
- "The reconfiguration process gave the following: "
- "{{reconfigure_result.stdout_lines}}"