Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #101 from tobiashuste/fix-gpus—runner-register
Browse files Browse the repository at this point in the history
Fix issues with newly introduced parameter gpu, memory and cpus
  • Loading branch information
tobiashuste authored Nov 18, 2022
2 parents eec7d7b + 3ab27c2 commit 21cea51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tasks/register.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
--docker-memory="{{ gitlab_runner.docker_memory }}"
{% endif %}
{% if gitlab_runner.docker_gpus is defined %}
--docker-cpus="{{ gitlab_runner.docker_gpus }}"
--docker-gpus="{{ gitlab_runner.docker_gpus }}"
{% endif %}
{% for security_opt in gitlab_runner.docker_security_opts | default([]) %}
--docker-security-opt "{{ security_opt }}"
Expand Down
6 changes: 3 additions & 3 deletions tasks/update-runner-configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
ansible.builtin.lineinfile:
dest: "{{ tmp_runner_config_file.path }}"
regexp: '^(\s*)cpus =.*'
line: '\1cpus = {{ gitlab_runner.docker_cpus }}'
line: '\1cpus = "{{ gitlab_runner.docker_cpus }}"'
state: present
backrefs: yes
check_mode: no
Expand All @@ -151,7 +151,7 @@
ansible.builtin.lineinfile:
dest: "{{ tmp_runner_config_file.path }}"
regexp: '^(\s*)memory =.*'
line: '\1memory = {{ gitlab_runner.docker_memory }}'
line: '\1memory = "{{ gitlab_runner.docker_memory }}"'
state: present
backrefs: yes
check_mode: no
Expand All @@ -162,7 +162,7 @@
ansible.builtin.lineinfile:
dest: "{{ tmp_runner_config_file.path }}"
regexp: '^(\s*)gpus =.*'
line: '\1gpus = {{ gitlab_runner.docker_gpus }}'
line: '\1gpus = "{{ gitlab_runner.docker_gpus }}"'
state: present
backrefs: yes
check_mode: no
Expand Down

0 comments on commit 21cea51

Please sign in to comment.