File tree Expand file tree Collapse file tree 6 files changed +25
-11
lines changed Expand file tree Collapse file tree 6 files changed +25
-11
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ gitlab_runner_check_interval: 0
32
32
33
33
# GitLab coordinator URL
34
34
gitlab_runner_coordinator_url : https://gitlab.com
35
- # GitLab registration token
35
+
36
+ # GitLab registration token.
36
37
gitlab_runner_registration_token : " "
37
38
38
39
# Gitlab runner registration token type:
@@ -44,9 +45,6 @@ gitlab_runner_registration_token_type: "registration-token"
44
45
45
46
gitlab_runner_sentry_dsn : " "
46
47
47
- # GitLab server IP
48
- gitlab_server_ip : " "
49
-
50
48
# GitLab TLS CA file
51
49
tls_ca_file : " "
52
50
@@ -125,6 +123,8 @@ gitlab_runner_runners:
125
123
# The executor used by the runner.
126
124
executor : shell
127
125
# Set maximum build log size in kilobytes.
126
+ # token:
127
+ # Set maximum build log size in kilobytes.
128
128
output_limit : 4096
129
129
# Maximum number of jobs to run concurrently on this specific runner.
130
130
# Defaults to 0, simply means don't limit.
Original file line number Diff line number Diff line change 2
2
collections :
3
3
- name : ansible.windows
4
4
- name : community.docker
5
+ - name : community.crypto
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : Accept gitlab server self signed cert as valid CA
3
- ansible.builtin.shell : >
4
- set -o pipefail
5
-
6
- openssl s_client -connect {{ gitlab_server_ip }}:443 -showcerts </dev/null 2>/dev/null |
7
- sed -e '/-----BEGIN/,/-----END/!d' | tee {{ tls_ca_file }} >/dev/null
8
- args :
9
- executable : /usr/bin/bash
10
3
when : force_accept_gitlab_server_self_signed
4
+ block :
5
+ - name : Grab the server cert for "{{ gitlab_runner_coordinator_url }}"
6
+ community.crypto.get_certificate :
7
+ host : " {{ gitlab_runner.url | default(gitlab_runner_coordinator_url) | regex_replace('https?:\/\/ ([^\/ ]+)\/ ?.*', '\\ 1') }}"
8
+ port : 443
9
+ asn1_base64 : true # need to hard code to prevent depreciation warning
10
+ register : gitlab_server_cert
11
+ - name : Save the GitLab server self signed cert to the default CA path
12
+ ansible.builtin.copy :
13
+ content : " {{ gitlab_server_cert.cert }}"
14
+ dest : " {{ tls_ca_file }}"
15
+ mode : ' 0644'
16
+ - name : Update CA bundle with self signe cert of the gitlab server
17
+ ansible.builtin.import_tasks : update-ca-bundle.yml
11
18
12
19
- name : Update CA bundle with self signe cert of the gitlab server
13
20
ansible.builtin.import_tasks : update-ca-bundle.yml
Original file line number Diff line number Diff line change @@ -5,3 +5,5 @@ gitlab_runner_executable: /usr/bin/{{ gitlab_runner_package_name }}
5
5
gitlab_runner_runtime_owner : gitlab-runner
6
6
gitlab_runner_runtime_group : gitlab-runner
7
7
gitlab_runner_restart_state : reloaded
8
+
9
+ tls_ca_file : /etc/ca-certificates/trust-source/anchors/gitlab-server.crt
Original file line number Diff line number Diff line change @@ -5,3 +5,5 @@ gitlab_runner_executable: /usr/bin/{{ gitlab_runner_package_name }}
5
5
gitlab_runner_runtime_owner : gitlab-runner
6
6
gitlab_runner_runtime_group : gitlab-runner
7
7
gitlab_runner_restart_state : reloaded
8
+
9
+ tls_ca_file : /usr/share/ca-certificates/gitlab-server.crt
Original file line number Diff line number Diff line change @@ -4,3 +4,5 @@ gitlab_runner_executable: /usr/bin/{{ gitlab_runner_package_name }}
4
4
5
5
gitlab_runner_runtime_owner : gitlab-runner
6
6
gitlab_runner_runtime_group : gitlab-runner
7
+
8
+ tls_ca_file : /etc/pki/ca-trust/source/anchors/gitlab-server.crt
You can’t perform that action at this time.
0 commit comments