start containers before pushing configurations when not using external volumes
This commit is contained in:
@@ -32,12 +32,26 @@
|
||||
register: 'register_docker_volume_gitlab_gitlab__run_secrets'
|
||||
tags: ['docker_gitlab']
|
||||
|
||||
- name: gitlab | start service to create volumes
|
||||
systemd:
|
||||
name: docker-compose@gitlab
|
||||
state: started
|
||||
when: not docker_services_external_volumes
|
||||
tags: ['docker_gitlab']
|
||||
|
||||
- name: gitlab | wait for volumes to be created
|
||||
wait_for:
|
||||
path: /var/lib/docker/volumes/gitlab__run_secrets/_data
|
||||
state: present
|
||||
timeout: 20
|
||||
when: not docker_services_external_volumes
|
||||
tags: ['docker_gitlab']
|
||||
|
||||
- name: 'gitlab | configure secret gitlab_root_password'
|
||||
copy:
|
||||
dest: '{{ register_docker_volume_gitlab_gitlab__run_secrets.volume.Mountpoint }}/gitlab_root_password'
|
||||
dest: '{{ register_docker_volume_gitlab_gitlab__run_secrets.volume.Mountpoint if docker_services_external_volumes else "/var/lib/docker/volumes/gitlab__run_secrets/_data" }}/gitlab_root_password'
|
||||
mode: '0600'
|
||||
content: '{{ gitlab_root_password }}'
|
||||
when: docker_services_external_volumes
|
||||
ignore_errors: '{{ ansible_check_mode }}'
|
||||
tags: ['docker_gitlab']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user