Puppet Class: zabbix::repo

Inherits:
zabbix::params
Defined in:
manifests/repo.pp

Overview



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
# File 'manifests/repo.pp', line 1

class zabbix::repo inherits zabbix::params {

  case $::osfamily {
    'RedHat': {
      yumrepo { 'zabbix':
        ensure   => present,
        descr    => 'Zabbix Official Repository - $basearch',
        baseurl  => "http://repo.zabbix.com/zabbix/${zabbix::version}/rhel/${::operatingsystemmajrelease}/${::architecture}/",
        enabled  => true,
        gpgkey   => 'http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX',
        gpgcheck => true,
      }
      yumrepo { 'zabbix-non-supported':
        ensure   => present,
        descr    => 'Zabbix Official Repository non-supported - $basearch',
        baseurl  => "http://repo.zabbix.com/non-supported/rhel/${::operatingsystemmajrelease}/${::architecture}/",
        enabled  => true,
        gpgkey   => 'http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX',
        gpgcheck => true,
      }
    }
    'Debian': {
      case $::operatingsystem {
        'Ubuntu': {
          apt::source { 'ubuntu-zabbix':
            location   => "http://repo.zabbix.com/zabbix/${zabbix::version}/ubuntu/",
            release    => "${::lsbdistcodename}",
            repos      => 'main non-free contrib',
            key        => '79EA5ED4',
            key_server => 'keyserver.ubuntu.com',
          }
        }
        'Debian': {
          apt::source { 'debian-zabbix':
            location   => "http://repo.zabbix.com/zabbix/${zabbix::version}/debian/",
            release    => "${::lsbdistcodename}",
            repos      => 'main non-free contrib',
            key        => '79EA5ED4',
            key_server => 'keyserver.ubuntu.com',
          }
        }
      }
    }
  }

}