fix error

This commit is contained in:
2023-10-18 21:14:00 +02:00
parent 062c0b9c6c
commit 5ae277dd3f
3 changed files with 10 additions and 5 deletions

View File

@@ -3,5 +3,5 @@ gitlab_dir:
- "/home/{{ansible_user}}/.gitlab2/config" - "/home/{{ansible_user}}/.gitlab2/config"
- "/home/{{ansible_user}}/.gitlab2/log" - "/home/{{ansible_user}}/.gitlab2/log"
- "/home/{{ansible_user}}/.gitlab2/data" - "/home/{{ansible_user}}/.gitlab2/data"
- "/home/{{ansible_user}}/.gitlab2/config/cert" - "/home/{{ansible_user}}/.gitlab2/config/ssl"

View File

@@ -5,18 +5,19 @@
dest: "{{gitlab_dir[0]}}/docker-compose.yml" dest: "{{gitlab_dir[0]}}/docker-compose.yml"
owner: "{{ansible_user}}" owner: "{{ansible_user}}"
group: "{{ansible_user}}" group: "{{ansible_user}}"
mode: 0777 mode: 0755
- name: Generate an OpenSSL private key with the default values (4096 bits, RSA) - name: Generate an OpenSSL private key with the default values (4096 bits, RSA)
openssl_privatekey: openssl_privatekey:
path: "{{gitlab_dir[4]}}/gitlab.key" path: "{{gitlab_dir[4]}}/gitlab.key"
size: 4096
- name: Generate an OpenSSL Certificate Signing Request - name: Generate an OpenSSL Certificate Signing Request
openssl_csr: openssl_csr:
path: "{{gitlab_dir[4]}}/gitlab.csr" path: "{{gitlab_dir[4]}}/gitlab.csr"
privatekey_path: "{{gitlab_dir[4]}}/gitlab.key" privatekey_path: "{{gitlab_dir[4]}}/gitlab.key"
#common_name: "{{ansible_hostname}" #common_name: "{{ansible_hostname}"
common_name: man-dan-03 common_name: "man-dan-03"
subject_alt_name: "{{ item.value | map('regex_replace', '^', 'DNS:') | list }}" subject_alt_name: "{{ item.value | map('regex_replace', '^', 'DNS:') | list }}"
with_dict: with_dict:
dns_server: dns_server:
@@ -29,6 +30,7 @@
privatekey_path: "{{gitlab_dir[4]}}/gitlab.key" privatekey_path: "{{gitlab_dir[4]}}/gitlab.key"
csr_path: "{{gitlab_dir[4]}}/gitlab.csr" csr_path: "{{gitlab_dir[4]}}/gitlab.csr"
provider: selfsigned provider: selfsigned
entrust_not_after: 365d
#- name: deploy Docker Compose stack #- name: deploy Docker Compose stack
# docker_compose: # docker_compose:

View File

@@ -7,11 +7,14 @@ services:
container_name: gitlab-ce container_name: gitlab-ce
environment: environment:
GITLAB_OMNIBUS_CONFIG: | GITLAB_OMNIBUS_CONFIG: |
gitlab_rails['time_zone'] = 'Europe/Berlin'
external_url 'https://{{ansible_host}}' external_url 'https://{{ansible_host}}'
gitlab_rails['gitlab_shell_ssh_port'] = {{ssh_port}} gitlab_rails['gitlab_shell_ssh_port'] = {{ssh_port}}
nginx['listen_port'] = 443 nginx['listen_port'] = 443
nginx['ssl_certificate'] = '/etc/gitlab/certs/gitlab.cer' nginx['redirect_http_to_https'] = true
nginx['ssl_certificate_key'] = '/etc/gitlab/certs/gitlab.key' nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.cer"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.key"
nginx['ssl_protocols'] = "TLSv1.1 TLSv1.2"
ports: ports:
- '{{http_ssl}}:443' - '{{http_ssl}}:443'
- '{{ssh_port}}:22' - '{{ssh_port}}:22'