Compare commits
8 Commits
db3760cb35
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 499daebb0c | |||
| d6d816665c | |||
| e2d802b963 | |||
| 6389205bed | |||
| 5ae277dd3f | |||
| 062c0b9c6c | |||
| 428cda4bf8 | |||
| 6f5b0fb21d |
@@ -1,6 +1,8 @@
|
||||
gitlab_folder: ".gitlab2"
|
||||
gitlab_dir:
|
||||
- "/home/{{ansible_user}}/.gitlab"
|
||||
- "/home/{{ansible_user}}/.gitlab/config"
|
||||
- "/home/{{ansible_user}}/.gitlab/log"
|
||||
- "/home/{{ansible_user}}/.gitlab/data"
|
||||
- "/home/{{ansible_user}}/{{gitlab_folder}}"
|
||||
- "/home/{{ansible_user}}/{{gitlab_folder}}/config"
|
||||
- "/home/{{ansible_user}}/{{gitlab_folder}}/log"
|
||||
- "/home/{{ansible_user}}/{{gitlab_folder}}/data"
|
||||
- "/home/{{ansible_user}}/{{gitlab_folder}}/config/ssl"
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,11 +1,44 @@
|
||||
---
|
||||
- name:
|
||||
shell: "hostnamectl hostname"
|
||||
register: var_gitlab_hostname
|
||||
|
||||
- name: Set fact for gitlab_hostname
|
||||
set_fact:
|
||||
gitlab_hostname: "{{ var_gitlab_hostname.stdout }}"
|
||||
|
||||
- name: Template Docker compose
|
||||
template:
|
||||
src: docker-compose.yml.j2
|
||||
dest: "{{gitlab_dir[0]}}/docker-compose.yml"
|
||||
owner: "{{ansible_user}}"
|
||||
group: "{{ansible_user}}"
|
||||
mode: 0777
|
||||
mode: 0755
|
||||
|
||||
- name: Generate an OpenSSL private key with the default values (4096 bits, RSA)
|
||||
openssl_privatekey:
|
||||
path: "{{gitlab_dir[4]}}/gitlab.key"
|
||||
size: 4096
|
||||
|
||||
- name: Generate an OpenSSL Certificate Signing Request
|
||||
openssl_csr:
|
||||
path: "{{gitlab_dir[4]}}/gitlab.csr"
|
||||
privatekey_path: "{{gitlab_dir[4]}}/gitlab.key"
|
||||
#common_name: "{{ansible_hostname}"
|
||||
common_name: "man-dan-03"
|
||||
subject_alt_name: "{{ item.value | map('regex_replace', '^', 'DNS:') | list }}"
|
||||
with_dict:
|
||||
dns_server:
|
||||
#- "{{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
|
||||
entrust_not_after: 365d
|
||||
|
||||
#- name: deploy Docker Compose stack
|
||||
# docker_compose:
|
||||
|
||||
@@ -1,17 +1,28 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
web:
|
||||
gitlab:
|
||||
image: 'gitlab/gitlab-ce:latest'
|
||||
restart: always
|
||||
restart: unless-stopped
|
||||
hostname: 'localhost'
|
||||
container_name: gitlab-ce
|
||||
environment:
|
||||
GITLAB_ROOT_PASSWORD: 'Start1234!'
|
||||
GITLAB_OMNIBUS_CONFIG: |
|
||||
external_url 'http://{{ansible_host}}:{{web_port}}'
|
||||
gitlab_rails['time_zone'] = 'Europe/Berlin'
|
||||
external_url 'https://{{gitlab_hostname}}'
|
||||
gitlab_rails['gitlab_shell_ssh_port'] = {{ssh_port}}
|
||||
nginx['listen_port'] = 443
|
||||
nginx['redirect_http_to_https'] = true
|
||||
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.cer"
|
||||
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.key"
|
||||
nginx['ssl_protocols'] = "TLSv1.1 TLSv1.2"
|
||||
registry_external_url 'https://registry.{{gitlab_hostname}}'
|
||||
registry['registry_http_addr'] = "0.0.0.0:5000"
|
||||
registry_nginx['enable'] = false
|
||||
ports:
|
||||
- '{{web_port}}:8929'
|
||||
- '{{http_ssl}}:443'
|
||||
- '{{ssh_port}}:22'
|
||||
- '5000:5000'
|
||||
volumes:
|
||||
- '{{gitlab_dir[1]}}:/etc/gitlab'
|
||||
- '{{gitlab_dir[2]}}:/var/log/gitlab'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
web_port: 8929
|
||||
web_port: 80
|
||||
http_ssl: 443
|
||||
ssh_port: 2222
|
||||
shm_size: "1024m"
|
||||
|
||||
@@ -1,8 +1 @@
|
||||
---
|
||||
# defaults file for roles/prereq-portainer
|
||||
# portainer direcotorys
|
||||
|
||||
#portainer_dir:
|
||||
# - "/home/{{ansible_user}}/.portainer"
|
||||
# - "/home/{{ansible_user}}/.portainer/cert"
|
||||
# - "/home/{{ansible_user}}/.portainer/data"
|
||||
@@ -1,2 +1 @@
|
||||
---
|
||||
# handlers file for roles/prereq-portainer
|
||||
|
||||
Reference in New Issue
Block a user