Compare commits
2 Commits
db3760cb35
...
428cda4bf8
| Author | SHA1 | Date | |
|---|---|---|---|
| 428cda4bf8 | |||
| 6f5b0fb21d |
@@ -1,6 +1,7 @@
|
||||
gitlab_dir:
|
||||
- "/home/{{ansible_user}}/.gitlab"
|
||||
- "/home/{{ansible_user}}/.gitlab/config"
|
||||
- "/home/{{ansible_user}}/.gitlab/log"
|
||||
- "/home/{{ansible_user}}/.gitlab/data"
|
||||
- "/home/{{ansible_user}}/.gitlab2"
|
||||
- "/home/{{ansible_user}}/.gitlab2/config"
|
||||
- "/home/{{ansible_user}}/.gitlab2/log"
|
||||
- "/home/{{ansible_user}}/.gitlab2/data"
|
||||
- "/home/{{ansible_user}}/.gitlab2/config/cert"
|
||||
|
||||
|
||||
Binary file not shown.
@@ -7,6 +7,29 @@
|
||||
group: "{{ansible_user}}"
|
||||
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
|
||||
# docker_compose:
|
||||
# project_src: "{{jenkins_dir[0]}}"
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
web:
|
||||
gitlab:
|
||||
image: 'gitlab/gitlab-ce:latest'
|
||||
restart: always
|
||||
hostname: 'localhost'
|
||||
container_name: gitlab-ce
|
||||
environment:
|
||||
GITLAB_OMNIBUS_CONFIG: |
|
||||
external_url 'http://{{ansible_host}}:{{web_port}}'
|
||||
external_url 'https://{{ansible_host}}'
|
||||
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:
|
||||
- '{{web_port}}:8929'
|
||||
- '{{http_ssl}}:443'
|
||||
- '{{ssh_port}}:22'
|
||||
volumes:
|
||||
- '{{gitlab_dir[1]}}:/etc/gitlab'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
web_port: 8929
|
||||
web_port: 80
|
||||
http_ssl: 443
|
||||
ssh_port: 2222
|
||||
shm_size: "1024m"
|
||||
|
||||
Reference in New Issue
Block a user