start containers before pushing configurations when not using external volumes
This commit is contained in:
@@ -25,6 +25,21 @@
|
||||
- gitlab-runner__etc_gitlab-runner
|
||||
tags: ['docker_gitlab-runner']
|
||||
|
||||
- name: gitlab-runner | start service to create volumes
|
||||
systemd:
|
||||
name: docker-compose@gitlab-runner
|
||||
state: started
|
||||
when: not docker_services_external_volumes
|
||||
tags: ['docker_gitlab-runner']
|
||||
|
||||
- name: gitlab-runner | wait for volumes to be created
|
||||
wait_for:
|
||||
path: /var/lib/docker/volumes/gitlab-runner__etc_gitlab-runner/_data
|
||||
state: present
|
||||
timeout: 20
|
||||
when: not docker_services_external_volumes
|
||||
tags: ['docker_gitlab-runner']
|
||||
|
||||
- name: gitlab-runner | configure config.toml
|
||||
copy:
|
||||
dest: '/var/lib/docker/volumes/gitlab-runner__etc_gitlab-runner/_data/config.toml'
|
||||
@@ -58,7 +73,6 @@
|
||||
{% if gitlab_runner_extra_hosts is defined %}
|
||||
extra_hosts = [{% for host in gitlab_runner_extra_hosts %}"{{ host }}"{{ ", " if not loop.last else "" }}{% endfor %}]
|
||||
{% endif %}
|
||||
when: docker_services_external_volumes
|
||||
notify: 'gitlab-runner-restart'
|
||||
tags: ['docker_gitlab-runner']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user