mirror of
https://github.com/davestephens/ansible-nas
synced 2024-12-24 10:33:06 +00:00
Merge branch 'mv-gitlab' of https://github.com/PurpleNinja225/NASible into PurpleNinja225-mv-gitlab
* 'mv-gitlab' of https://github.com/PurpleNinja225/NASible: mv gitlab to role
This commit is contained in:
commit
2d5df1930b
4 changed files with 43 additions and 20 deletions
|
@ -29,9 +29,6 @@ krusader_enabled: false
|
|||
# Backup & Restore
|
||||
timemachine_enabled: false
|
||||
|
||||
# Software build and CI
|
||||
gitlab_enabled: false
|
||||
|
||||
# IRC
|
||||
thelounge_enabled: false
|
||||
|
||||
|
@ -286,16 +283,6 @@ stat_collection_interval: 15s
|
|||
grafana_influxdb_port: "8086"
|
||||
grafana_port: "3000"
|
||||
|
||||
|
||||
###
|
||||
### Gitlab
|
||||
###
|
||||
gitlab_available_externally: "false"
|
||||
gitlab_data_directory: "{{ docker_home }}/gitlab"
|
||||
gitlab_port_http: "4080"
|
||||
gitlab_port_https: "4443"
|
||||
gitlab_port_ssh: "422"
|
||||
|
||||
###
|
||||
### Guacamole
|
||||
###
|
||||
|
|
11
nas.yml
11
nas.yml
|
@ -93,15 +93,20 @@
|
|||
- firefly
|
||||
when: (firefly_enabled | default(False))
|
||||
|
||||
- role: get_iplayer
|
||||
tags:
|
||||
- get_iplayer
|
||||
when: (get_iplayer_enabled | default(False))
|
||||
|
||||
- role: gitea
|
||||
tags:
|
||||
- gitea
|
||||
when: (gitea_enabled | default(False))
|
||||
|
||||
- role: get_iplayer
|
||||
- role: gitlab
|
||||
tags:
|
||||
- get_iplayer
|
||||
when: (get_iplayer_enabled | default(False))
|
||||
- gitlab
|
||||
when: (gitlab_enabled | default(False))
|
||||
|
||||
- role: glances
|
||||
tags:
|
||||
|
|
16
roles/gitlab/defaults/main.yml
Normal file
16
roles/gitlab/defaults/main.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
# enable or disable the application
|
||||
gitlab_enabled: false
|
||||
gitlab_available_externally: "false"
|
||||
|
||||
# directories
|
||||
gitlab_data_directory: "{{ docker_home }}/gitlab"
|
||||
|
||||
# network
|
||||
gitlab_hostname: "gitlab"
|
||||
gitlab_port_http: "4080"
|
||||
gitlab_port_https: "4443"
|
||||
gitlab_port_ssh: "422"
|
||||
|
||||
# specs
|
||||
gitlab_memory: "4g"
|
|
@ -16,6 +16,16 @@
|
|||
create_home: no
|
||||
group: gitlab
|
||||
|
||||
- name: Create Gitlab user account
|
||||
user:
|
||||
name: gitlab
|
||||
uid: 998
|
||||
state: present
|
||||
system: yes
|
||||
update_password: on_create
|
||||
create_home: no
|
||||
group: gitlab
|
||||
|
||||
- name: Create Gitlab Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
|
@ -27,7 +37,7 @@
|
|||
- "{{ gitlab_data_directory }}/log"
|
||||
- "{{ gitlab_data_directory }}/data"
|
||||
|
||||
- name: Create Gitlab container
|
||||
- name: Create Gitlab Docker Container
|
||||
docker_container:
|
||||
name: gitlab
|
||||
image: gitlab/gitlab-ce:latest
|
||||
|
@ -36,16 +46,21 @@
|
|||
- "{{ gitlab_data_directory }}/config:/etc/gitlab:rw"
|
||||
- "{{ gitlab_data_directory }}/log:/var/log/gitlab:rw"
|
||||
- "{{ gitlab_data_directory }}/data:/var/opt/gitlab:rw"
|
||||
network_mode: "bridge"
|
||||
ports:
|
||||
- "{{ gitlab_port_http }}:80"
|
||||
- "{{ gitlab_port_https }}:443"
|
||||
- "{{ gitlab_port_ssh }}:22"
|
||||
hostname: "gitlab.{{ ansible_nas_domain }}"
|
||||
env:
|
||||
TZ: "{{ ansible_nas_timezone }}"
|
||||
PUID: "{{ gitlab_user_id }}"
|
||||
PGID: "{{ gitlab_group_id }}"
|
||||
restart_policy: unless-stopped
|
||||
memory: 4g
|
||||
hostname: "{{ gitlab_hostname }}.{{ ansible_nas_domain }}"
|
||||
memory: "{{ gitlab_memory }}"
|
||||
labels:
|
||||
traefik.enable: "{{ gitlab_available_externally }}"
|
||||
traefik.http.routers.gitlab.rule: "Host(`gitlab.{{ ansible_nas_domain }}`)"
|
||||
traefik.http.routers.gitlab.rule: "Host(`{{ gitlab_hostname }}.{{ ansible_nas_domain }}`)"
|
||||
traefik.http.routers.gitlab.tls.certresolver: "letsencrypt"
|
||||
traefik.http.routers.gitlab.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||
traefik.http.routers.gitlab.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
Loading…
Reference in a new issue