riemers / ansible-gitlab-runner

Ansible role to install gitlab-runner
MIT License
351 stars 267 forks source link

Runtime owner and group for container setup #320

Closed citypilgrim closed 8 months ago

citypilgrim commented 8 months ago

When setting a gitlab_runner_runner.cache_dir config in defaults/main.yml. When using a docker executor, the task "Ensure directory permissions" fails because gitlab_runner_runtime_{owner,group} is set to gitlab-runner, when it should be root for docker executors.

Propose adding a task in main-container.yml:

- name: (Container) Set Runtime group and owner
  set_fact:
    gitlab_runner_runtime_owner: root
    gitlab_runner_runtime_group: root
citypilgrim commented 8 months ago

Sorry, my mistake, gitlab_runner_runtime_{owner,group} refer to user/group for which gitlab-runner was installed. For docker executors, this is where the bind mount for cache_dir resides