blob: ac66a163dc3328f90dd5e60dfe8af4e0c97f0610 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
define check_mk::hostgroup (
$dir,
$hostgroups,
$target,
) {
$group = $title
$group_tags = join($hostgroups[$group], ',')
concat::fragment { "check_mk-hostgroup-${group}":
target => $target,
content => " ( '${group}', [ ${group_tags} ], ALL_HOSTS ),\n",
order => 21,
}
file { "${dir}/${group}.cfg":
ensure => present,
content => "define hostgroup {\n hostgroup_name ${group}\n}\n",
require => File[$dir],
}
}
|