summaryrefslogtreecommitdiff
path: root/manifests/host.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/host.pp')
-rw-r--r--manifests/host.pp18
1 files changed, 14 insertions, 4 deletions
diff --git a/manifests/host.pp b/manifests/host.pp
index 5c83b96..87687a4 100644
--- a/manifests/host.pp
+++ b/manifests/host.pp
@@ -1,8 +1,18 @@
-define check_mk::host {
+define check_mk::host (
+ $target,
+ $host_tags = [],
+) {
$host = $title
+ if size($host_tags) > 0
+ $_tags = join($host_tags,'|')
+ $entry = "${host}|${_tags}"
+ }
+ else {
+ $entry = $host
+ }
concat::fragment { "check_mk-${host}":
- target => '/etc/check_mk/main.mk',
- content => " '${host}',\n",
- order => 02,
+ target => $target,
+ content => " '${entry}',\n",
+ order => 11,
}
}