diff --git a/tasks/gitlab-runner.yml b/tasks/gitlab-runner.yml index 20c7990..d468d46 100644 --- a/tasks/gitlab-runner.yml +++ b/tasks/gitlab-runner.yml @@ -9,7 +9,12 @@ - include_tasks: base.yml tags: ['docker_gitlab'] -- name: 'gitlab-runner | create docker volumes' +- name: gitlab-runner | create docker network + docker_network: + name: 'gitlab-runner' + tags: ['docker_gitlab-runner'] + +- name: gitlab-runner | create docker volumes docker_volume: name: '{{ item }}' with_items: @@ -19,7 +24,7 @@ - gitlab-runner__etc_gitlab-runner tags: ['docker_gitlab-runner'] -- name: 'gitlab-runner | register to gitlab' +- name: gitlab-runner | register to gitlab uri: url: 'https://{{ gitlab_domain }}/api/v4/runners' method: POST @@ -33,7 +38,7 @@ - 'gitlab_runner_register_token is defined' tags: ['docker_gitlab-runner'] -- name: 'gitlab-runner | configure config.toml' +- name: gitlab-runner | configure config.toml copy: dest: '/var/lib/docker/volumes/gitlab-runner__etc_gitlab-runner/_data/config.toml' mode: '0600' @@ -65,7 +70,7 @@ - 'register_gitlab_runner_register.json.token is defined' tags: ['docker_gitlab-runner'] -- name: 'gitab-runner | configure cron garbage in dind' +- name: gitab-runner | configure cron garbage in dind cron: name: "gitlab_runner_garbage" minute: "50" @@ -73,7 +78,7 @@ job: "/usr/bin/docker exec docker docker system prune -f; /usr/bin/docker exec docker docker volume prune -f 2>&1 |logger -t gitlab-runner" tags: ['docker_gitlab-runner'] -- name: 'gitab-runner | purge dind cache' +- name: gitab-runner | purge dind cache cron: name: "purge_dind_ci_cache" minute: "30" diff --git a/templates/compose/gitlab-runner.yml.j2 b/templates/compose/gitlab-runner.yml.j2 index 0f402b4..944dbf5 100644 --- a/templates/compose/gitlab-runner.yml.j2 +++ b/templates/compose/gitlab-runner.yml.j2 @@ -37,7 +37,7 @@ services: tag: docker_gitlab-runner docker: - image: {{ gitlab_runner_dind_version | default("latest") }} + image: docker:{{ gitlab_runner_dind_version | default("latest") }} container_name: docker restart: unless-stopped privileged: yes