mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 05:36:59 +01:00
Add emby and gitlab
This commit is contained in:
parent
9b031c14b6
commit
409828214b
13 changed files with 1743 additions and 3 deletions
24
roles/gitlab-docker/tasks/main.yml
Normal file
24
roles/gitlab-docker/tasks/main.yml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
- name: Copy gitlab config
|
||||
copy: src=gitlab dest={{docker_compose_files_folder}}
|
||||
- name: Create gitlab config
|
||||
template: src=gitlab/config/gitlab.rb dest={{docker_compose_files_folder}}/gitlab/config/gitlab.rb
|
||||
- name: Start gitlab docker project
|
||||
docker_service: project_src={{docker_compose_files_folder}}/gitlab state=present
|
||||
- name: Find Gitlab user repositories
|
||||
find: paths=/var/lib/gitlab/git-data/repositories/ file_type=directory patterns="*"
|
||||
register: gitlab_users_repos
|
||||
- name: Get Gitlab git user id
|
||||
command: docker exec gitlab_gitlab_1 id -u git
|
||||
register: gitlab_git_uid
|
||||
when: gitlab_users_repos.matched|int == 0
|
||||
- name: Wait for Gitlab to be installed
|
||||
wait_for:
|
||||
path: /var/lib/gitlab/postgres-exporter/
|
||||
state: present
|
||||
when: gitlab_users_repos.matched|int == 0
|
||||
- name: Restore backup if no users are found
|
||||
script: restore-backup.sh {{gitlab_git_uid.stdout}}
|
||||
args:
|
||||
chdir: "{{docker_compose_files_folder}}/gitlab/"
|
||||
when: gitlab_users_repos.matched|int == 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue