Skip to content

Commit

Permalink
Merge pull request #4 from romaincabassot/docker_privileged
Browse files Browse the repository at this point in the history
Docker privileged
  • Loading branch information
riemers authored Aug 8, 2017
2 parents ce4dab6 + 2aba998 commit 46604a8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ gitlab_runner_executor: 'shell'
gitlab_runner_docker_image: ''
# Runner tags
gitlab_runner_tags: []
# Docker privileged mode
gitlab_runner_docker_privileged: false

3 changes: 2 additions & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
# handlers file for gitlab-runner
- name: restart_gitlab_runner
service: name=gitlab-runner state=restarted
16 changes: 14 additions & 2 deletions tasks/global-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
- name: Set concurrent option
lineinfile:
dest: /etc/gitlab-runner/config.toml
regexp: ^concurrent =
line: concurrent = {{ gitlab_runner_concurrent }}
regexp: '^(\s*)concurrent ='
line: '\1concurrent = {{ gitlab_runner_concurrent }}'
state: present
backrefs: yes
notify: restart_gitlab_runner

- name: Set docker privileged option
lineinfile:
dest: /etc/gitlab-runner/config.toml
regexp: '^(\s*)privileged ='
line: '\1privileged = {{ gitlab_runner_docker_privileged | lower}}'
state: present
backrefs: yes
notify: restart_gitlab_runner

0 comments on commit 46604a8

Please sign in to comment.