summaryrefslogtreecommitdiff
path: root/puppet/modules/check_mk/manifests/host.pp
diff options
context:
space:
mode:
authorMicah <micah@leap.se>2016-07-12 16:46:32 -0400
committerMicah <micah@leap.se>2016-07-12 16:46:32 -0400
commit56a771a3008d10720dd05fd815aeafbacdd1e08e (patch)
tree4b96fc087072834759eafd6949391de73ac43737 /puppet/modules/check_mk/manifests/host.pp
parenta75fea409bf8e62e55ba341672c202aab5fa480e (diff)
git subrepo clone https://leap.se/git/puppet_check_mk puppet/modules/check_mk
subrepo: subdir: "puppet/modules/check_mk" merged: "aa02571" upstream: origin: "https://leap.se/git/puppet_check_mk" branch: "master" commit: "aa02571" git-subrepo: version: "0.3.0" origin: "https://github.com/ingydotnet/git-subrepo" commit: "1e79595" Change-Id: I6cb060eb80966dd6ae346f7a8105289caa9ccbaf
Diffstat (limited to 'puppet/modules/check_mk/manifests/host.pp')
-rw-r--r--puppet/modules/check_mk/manifests/host.pp18
1 files changed, 18 insertions, 0 deletions
diff --git a/puppet/modules/check_mk/manifests/host.pp b/puppet/modules/check_mk/manifests/host.pp
new file mode 100644
index 00000000..49f038b5
--- /dev/null
+++ b/puppet/modules/check_mk/manifests/host.pp
@@ -0,0 +1,18 @@
+define check_mk::host (
+ $target,
+ $host_tags = [],
+) {
+ $host = $title
+ if size($host_tags) > 0 {
+ $taglist = join(any2array($host_tags),'|')
+ $entry = "${host}|${taglist}"
+ }
+ else {
+ $entry = $host
+ }
+ concat::fragment { "check_mk-${host}":
+ target => $target,
+ content => " '${entry}',\n",
+ order => 11,
+ }
+}