From e1747fe7411200e59e6a13d930bcacbd45f9c7eb Mon Sep 17 00:00:00 2001 From: Dan Dunckel Date: Wed, 27 Sep 2017 10:29:41 -0600 Subject: [PATCH] Pass 'package_name' as 'binary' to runner define for proper execution of the runner registration --- manifests/cirunner.pp | 1 + manifests/runner.pp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/manifests/cirunner.pp b/manifests/cirunner.pp index f25945c6..182c1151 100644 --- a/manifests/cirunner.pp +++ b/manifests/cirunner.pp @@ -152,6 +152,7 @@ $runners = keys($runners_hash) $default_config = hiera_hash($hiera_default_config_key, {}) gitlab::runner { $runners: + binary => $package_name, default_config => $default_config, runners_hash => $runners_hash, require => Exec['gitlab-runner-restart'], diff --git a/manifests/runner.pp b/manifests/runner.pp index 623f31cc..a09b423b 100644 --- a/manifests/runner.pp +++ b/manifests/runner.pp @@ -21,10 +21,12 @@ # Copyright 2015 Tobias Brunner, VSHN AG # define gitlab::runner ( + $binary, $runners_hash, $default_config = {}, ) { + validate_string($binary) validate_hash($runners_hash) validate_hash($default_config) @@ -48,7 +50,7 @@ # Execute gitlab ci multirunner register exec {"Register_runner_${title}": - command => "/usr/bin/gitlab-ci-multi-runner register -n ${parameters_string}", + command => "/usr/bin/${binary} register -n ${parameters_string}", unless => "/bin/grep ${runner_name} ${toml_file}", }