Newer
Older
---
- name: Chech if version is passed
assert:
that:
- CI_PIPELINE_ID is defined
- name: Create a directory for trusted-certs
file:
state: directory
mode: '0755'
- name: Create a directory for ssl
file:
state: directory
mode: '0755'
- name: Create a symbolic link to /opt/ssl/fullchain.pem
file:
src: /opt/ssl/fullchain.pem
owner: root
group: root
state: link
loop: "{{ gitlab_hostnames }}"
notify: Reconfigure gitlab
- name: Create a symbolic link to /opt/ssl/privkey.pem
file:
src: /opt/ssl/privkey.pem
owner: root
group: root
state: link
loop: "{{ gitlab_hostnames }}"
notify: Reconfigure gitlab
- name: Template a file to /opt/gitlab-config/_version_/gitlab.rb
copy:
content: |
{{ gitlab_config }}
dest: "/opt/gitlab-config/{{ CI_PIPELINE_ID }}/gitlab.rb"
owner: root
group: root
mode: 0644
src: "/opt/gitlab-config/{{ CI_PIPELINE_ID }}/gitlab.rb"
dest: /etc/gitlab/gitlab.rb