Compare commits

..

2 Commits

Author SHA1 Message Date
428cda4bf8 added 2023-10-18 20:13:04 +02:00
6f5b0fb21d commit message from python script 2023-10-18 17:45:48 +02:00
5 changed files with 36 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
gitlab_dir: gitlab_dir:
- "/home/{{ansible_user}}/.gitlab" - "/home/{{ansible_user}}/.gitlab2"
- "/home/{{ansible_user}}/.gitlab/config" - "/home/{{ansible_user}}/.gitlab2/config"
- "/home/{{ansible_user}}/.gitlab/log" - "/home/{{ansible_user}}/.gitlab2/log"
- "/home/{{ansible_user}}/.gitlab/data" - "/home/{{ansible_user}}/.gitlab2/data"
- "/home/{{ansible_user}}/.gitlab2/config/cert"

View File

@@ -7,6 +7,29 @@
group: "{{ansible_user}}" group: "{{ansible_user}}"
mode: 0777 mode: 0777
- name: Generate an OpenSSL private key with the default values (4096 bits, RSA)
openssl_privatekey:
path: "{{gitlab_dir[4]}}/gitlab.key"
- name: Generate an OpenSSL Certificate Signing Request
openssl_csr:
path: "{{gitlab_dir[4]}}/gitlab.csr"
privatekey_path: "{{gitlab_dir[4]}}/gitlab.key"
common_name: gitlab.man-dan-03
subject_alt_name: "{{ item.value | map('regex_replace', '^', 'DNS:') | list }}"
with_dict:
dns_server:
#- j337114.servers.jiffybox.net
#- "{{ansible_hostname}}"
- "man-dan-03"
- name: Generate a Self Signed OpenSSL certificate
openssl_certificate:
path: "{{gitlab_dir[4]}}/gitlab.cer"
privatekey_path: "{{gitlab_dir[4]}}/gitlab.key"
csr_path: "{{gitlab_dir[4]}}/gitlab.csr"
provider: selfsigned
#- name: deploy Docker Compose stack #- name: deploy Docker Compose stack
# docker_compose: # docker_compose:
# project_src: "{{jenkins_dir[0]}}" # project_src: "{{jenkins_dir[0]}}"

View File

@@ -1,16 +1,19 @@
version: '3.8' version: '3.8'
services: services:
web: gitlab:
image: 'gitlab/gitlab-ce:latest' image: 'gitlab/gitlab-ce:latest'
restart: always restart: always
hostname: 'localhost' hostname: 'localhost'
container_name: gitlab-ce container_name: gitlab-ce
environment: environment:
GITLAB_OMNIBUS_CONFIG: | GITLAB_OMNIBUS_CONFIG: |
external_url 'http://{{ansible_host}}:{{web_port}}' 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['ssl_certificate'] = '/etc/gitlab/certs/gitlab.cer'
nginx['ssl_certificate_key'] = '/etc/gitlab/certs/gitlab.key'
ports: ports:
- '{{web_port}}:8929' - '{{http_ssl}}:443'
- '{{ssh_port}}:22' - '{{ssh_port}}:22'
volumes: volumes:
- '{{gitlab_dir[1]}}:/etc/gitlab' - '{{gitlab_dir[1]}}:/etc/gitlab'

View File

@@ -1,3 +1,4 @@
web_port: 8929 web_port: 80
http_ssl: 443
ssh_port: 2222 ssh_port: 2222
shm_size: "1024m" shm_size: "1024m"