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
|
# File 'manifests/zabbixapi.pp', line 5
class zabbix::zabbixapi (
$zabbix_version = $zabbix::params::zabbix_version,
$puppetgem = $zabbix::params::puppetgem,
) inherits zabbix::params {
# Determine correct zabbixapi version.
case $zabbix_version {
/^[56]\.[024]/: {
$zabbixapi_version = '5.0.0-alpha1'
}
default: {
fail("Zabbix ${zabbix_version} is not supported!")
}
}
$compile_packages = $facts['os']['family'] ? {
'RedHat' => ['make', 'gcc-c++', 'rubygems', 'ruby'],
'Debian' => ['make', 'g++', 'ruby-dev', 'ruby', 'pkg-config',],
default => [],
}
ensure_packages($compile_packages)
# Installing the zabbixapi gem package. We need this gem for
# communicating with the zabbix-api. This is way better then
# doing it ourself.
package { 'zabbixapi':
ensure => $zabbixapi_version,
provider => $puppetgem,
}
}
|