summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/config.pp3
-rw-r--r--manifests/init.pp6
-rw-r--r--manifests/params.pp2
3 files changed, 6 insertions, 5 deletions
diff --git a/manifests/config.pp b/manifests/config.pp
index c8a6fbd..fec0ac2 100644
--- a/manifests/config.pp
+++ b/manifests/config.pp
@@ -21,7 +21,4 @@ class gitlab_ci_multi_runner::config (
order => '01',
}
- if $gitlab_ci_multi_runner::runners {
- create_resources(gitlab_ci_multi_runner::runner, $runners)
- }
}
diff --git a/manifests/init.pp b/manifests/init.pp
index 1670d98..cd39308 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -45,7 +45,11 @@ class gitlab_ci_multi_runner (
$config_file = $gitlab_ci_multi_runner::params::config_file,
) inherits gitlab_ci_multi_runner::params {
- # validate parameters here
+ validate_hash($gitlab_ci_multi_runner::runners)
+
+ if $gitlab_ci_multi_runner::runners {
+ create_resources(gitlab_ci_multi_runner::runner, $runners)
+ }
anchor { 'before_gitlab_ci_multi_runner': } ->
class { 'gitlab_ci_multi_runner::install': } ->
diff --git a/manifests/params.pp b/manifests/params.pp
index d883d12..5a18d34 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -10,7 +10,7 @@ class gitlab_ci_multi_runner::params {
$group = 'gitlab-runner'
$concurrent = 1
- $runners = undef
+ $runners = {}
$service_ensure = true
$service_start = '/usr/bin/gitlab-ci-multi-runner start'