-
-
Notifications
You must be signed in to change notification settings - Fork 227
/
agent.pp
47 lines (46 loc) · 1.23 KB
/
agent.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# == Class zabbix::resources::agent
#
# This will create an resources into puppetdb
# for automatically configuring agent into
# zabbix front-end.
#
# === Requirements
#
# Nothing.
#
# When manage_resource is set to true, this class
# will be loaded from 'zabbix::agent'. So no need
# for loading this class manually.
#
#
class zabbix::resources::agent (
$hostname = undef,
$ipaddress = undef,
$use_ip = undef,
$port = undef,
$group = undef,
Array[String[1]] $groups = undef,
$group_create = undef,
$templates = undef,
$proxy = undef,
) {
if $group and $groups {
fail("Got group and groups. This isn't support! Please use groups only.")
} else {
if $group {
warning('Passing group to zabbix::resources::agent is deprecated and will be removed. Use groups instead.')
$_groups = Array($group)
} else {
$_groups = $groups
}
}
@@zabbix_host { $hostname:
ipaddress => $ipaddress,
use_ip => $use_ip,
port => $port,
groups => $groups,
group_create => $group_create,
templates => $templates,
proxy => $proxy,
}
}