Add emby and gitlab

This commit is contained in:
Paul-Henri Froidmont 2017-12-30 05:28:32 +01:00
parent 9b031c14b6
commit 409828214b
13 changed files with 1743 additions and 3 deletions

View 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