Puppet Class: zabbix::repo

Inherits:
zabbix
Defined in:
manifests/repo.pp

Overview

Class: Repository Depends: Main class [::zabbix]

Parameters:

  • zabbix_repo (Any) (defaults to: $repository)


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

class zabbix::repo (
  $zabbix_repo = $repository,
) inherits zabbix {
  
  notice("URL: [${zabbix_repo}/zabbix/2.4/rhel/${::operatingsystemmajrelease}/${::architecture}/]")

  case $::operatingsystem {
    /(RedHat)/: {
      notice('Redhat OS must be install from RHN channel [Satellite].')
    }
    /(CentOS|Fedora)/: {
      yumrepo{ 'zabbix':
        descr    => "Zabbix Official Repository - ${::architecture}",
        baseurl  => "${zabbix_repo}/zabbix/2.4/rhel/${::operatingsystemmajrelease}/${::architecture}/",
        enabled  => 1,
        gpgcheck => 1,
        gpgkey   => "${zabbix_repo}/RPM-GPG-KEY-ZABBIX",
      }
    }
    /(Debian)/: {
      apt::source { 'repo.zabbix.com':
        location =>  "${zabbix_repo}/zabbix/2.4/debian",
        release  => 'wheezy',
        repos    => 'main',
        key      => 'FBABD5FB20255ECAB22EE194D13D58E479EA5ED4',
      }
    }
    /(Ubuntu)/: {
      apt::source { 'repo.zabbix.com':
        location =>  "${zabbix_repo}/zabbix/2.4/ubuntu",
        release  => 'precise',
        repos    => 'main',
        key      => 'FBABD5FB20255ECAB22EE194D13D58E479EA5ED4',
      }
    }
    default: {
      fail("${::operatingsystem} is not supported yet!")
    }
  }
}