From 3cff31e6e9add7bd49b818dc40d4a8f1ae088316 Mon Sep 17 00:00:00 2001
From: Samuel Jaeschke <samjetski@gmail.com>
Date: Wed, 10 Jan 2018 19:33:13 +1030
Subject: [PATCH] Fix concurrency auto-detection

Auto-detect runner concurrency based on total CPU threads (vcpus), instead of only processor cores. This accounts for both multiple cores and multiple processors.

See https://stackoverflow.com/questions/39539559/ansible-procesor-count-vs-processor-cores-vs-processor-vcpus
---
 defaults/main.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/defaults/main.yml b/defaults/main.yml
index 6355f21..7cb9b01 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -3,7 +3,7 @@
 gitlab_runner_package_name: 'gitlab-ci-multi-runner'
 
 # Maximum number of jobs to run concurrently
-gitlab_runner_concurrent: '{{ ansible_processor_cores }}'
+gitlab_runner_concurrent: '{{ ansible_processor_vcpus }}'
 
 # GitLab coordinator URL
 gitlab_runner_coordinator_url: 'https://gitlab.com/ci'
@@ -30,4 +30,4 @@ gitlab_runner_ssh_password: ''
 # Runner SSH identity file
 gitlab_runner_ssh_identity_file: ''
 # Runner Locked
-gitlab_runner_locked: 'false'
\ No newline at end of file
+gitlab_runner_locked: 'false'
-- 
GitLab