summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorJeoffrey Bauvin <jeoffrey.bauvin.ext@boursorama.fr>2015-10-26 11:52:35 +0100
committerJeoffrey Bauvin <jeoffrey.bauvin.ext@boursorama.fr>2015-10-26 11:52:35 +0100
commit9e34914cc75d5c8199538abcae59a486a2282eb3 (patch)
tree862e2ad188985ab31cfbfc17ec0f6d2f2a732e00 /manifests
parente1146e11669136fb06e53112a8db9d674130a6f9 (diff)
Add skeleton
Diffstat (limited to 'manifests')
-rw-r--r--manifests/config.pp6
-rw-r--r--manifests/init.pp21
-rw-r--r--manifests/install.pp8
-rw-r--r--manifests/params.pp20
-rw-r--r--manifests/service.pp14
5 files changed, 69 insertions, 0 deletions
diff --git a/manifests/config.pp b/manifests/config.pp
new file mode 100644
index 0000000..f3c3f6c
--- /dev/null
+++ b/manifests/config.pp
@@ -0,0 +1,6 @@
+# == Class gitlab_ci_multi_runner::config
+#
+# This class is called from gitlab_ci_multi_runner
+#
+class gitlab_ci_multi_runner::config {
+}
diff --git a/manifests/init.pp b/manifests/init.pp
new file mode 100644
index 0000000..c0475a5
--- /dev/null
+++ b/manifests/init.pp
@@ -0,0 +1,21 @@
+# == Class: gitlab_ci_multi_runner
+#
+# Full description of class gitlab_ci_multi_runner here.
+#
+# === Parameters
+#
+# [*sample_parameter*]
+# Explanation of what this parameter affects and what it defaults to.
+#
+class gitlab_ci_multi_runner (
+ $package_name = $gitlab_ci_multi_runner::params::package_name,
+ $service_name = $gitlab_ci_multi_runner::params::service_name,
+) inherits gitlab_ci_multi_runner::params {
+
+ # validate parameters here
+
+ class { 'gitlab_ci_multi_runner::install': } ->
+ class { 'gitlab_ci_multi_runner::config': } ~>
+ class { 'gitlab_ci_multi_runner::service': } ->
+ Class['gitlab_ci_multi_runner']
+}
diff --git a/manifests/install.pp b/manifests/install.pp
new file mode 100644
index 0000000..9a1fed0
--- /dev/null
+++ b/manifests/install.pp
@@ -0,0 +1,8 @@
+# == Class gitlab_ci_multi_runner::install
+#
+class gitlab_ci_multi_runner::install {
+
+ package { $gitlab_ci_multi_runner::package_name:
+ ensure => present,
+ }
+}
diff --git a/manifests/params.pp b/manifests/params.pp
new file mode 100644
index 0000000..775c3ef
--- /dev/null
+++ b/manifests/params.pp
@@ -0,0 +1,20 @@
+# == Class gitlab_ci_multi_runner::params
+#
+# This class is meant to be called from gitlab_ci_multi_runner
+# It sets variables according to platform
+#
+class gitlab_ci_multi_runner::params {
+ case $::osfamily {
+ 'Debian': {
+ $package_name = 'gitlab_ci_multi_runner'
+ $service_name = 'gitlab_ci_multi_runner'
+ }
+ 'RedHat', 'Amazon': {
+ $package_name = 'gitlab_ci_multi_runner'
+ $service_name = 'gitlab_ci_multi_runner'
+ }
+ default: {
+ fail("${::operatingsystem} not supported")
+ }
+ }
+}
diff --git a/manifests/service.pp b/manifests/service.pp
new file mode 100644
index 0000000..8ac2727
--- /dev/null
+++ b/manifests/service.pp
@@ -0,0 +1,14 @@
+# == Class gitlab_ci_multi_runner::service
+#
+# This class is meant to be called from gitlab_ci_multi_runner
+# It ensure the service is running
+#
+class gitlab_ci_multi_runner::service {
+
+ service { $gitlab_ci_multi_runner::service_name:
+ ensure => running,
+ enable => true,
+ hasstatus => true,
+ hasrestart => true,
+ }
+}