add gitlab-runner user to the docker group

The user named "gitlab-runner" has to be in the "docker" group if it
hopes to use the docker executor.
master
Devan Carpenter 2 years ago
parent b9a3214c2e
commit 44ce3fe7db
Signed by: dvn
GPG Key ID: E1707CFFD7B85A02

@ -59,3 +59,12 @@
template:
src: gitlab-runner.toml
dest: /etc/gitlab-runner/config.toml
- name: Put gitlab-runner in the docker group
user:
append: yes ## Don't set these as our *only* groups!
groups: docker
name: "{{ item }}"
with_items:
- gitlab-runner
when: ansible_local.gitlab_runner.executor == "docker"

Loading…
Cancel
Save