summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Chicoli <rafaelchicoli@hotmail.com>2016-01-28 20:57:56 +0100
committerRafael Chicoli <rafaelchicoli@hotmail.com>2016-01-28 21:48:26 +0100
commit30215b4afecbeb591fc3c66cd5be9fc2f59fc54d (patch)
tree1d615979fb9aa44e7db548c4cb6bfa9c30ea587c
parent5c1fd200344fecdb3e4c79de11792d6a79df098a (diff)
move create_ressources runners to init file
-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'