Puppet Class: icingaweb2::repo
- Defined in:
- manifests/repo.pp
Overview
Class: icingaweb2::repo
This class manages the packages.icinga.com repository based on the operating system.
Parameters
This class does not provide any parameters. To control the behaviour of this class, have a look at the parameters:
-
icingaweb2::manage_repo
Examples
This class is private and should not be called by others than this module.
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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'manifests/repo.pp', line 15
class icingaweb2::repo {
assert_private("You're not supposed to use this defined type manually.")
if $::icingaweb2::manage_repo and $::icingaweb2::manage_package {
case $::facts['os']['family'] {
'redhat': {
case $::facts['os']['name'] {
'centos', 'redhat': {
yumrepo { 'icinga-stable-release':
baseurl => "http://packages.icinga.com/epel/${::facts['os']['release']['major']}/release/",
descr => 'ICINGA (stable release for epel)',
enabled => 1,
gpgcheck => 1,
gpgkey => 'http://packages.icinga.com/icinga.key',
}
}
default: {
fail('Your plattform is not supported to manage a repository.')
}
}
}
'debian': {
case $::facts['os']['name'] {
'debian': {
include ::apt, ::apt::backports
apt::source { 'icinga-stable-release':
location => 'http://packages.icinga.com/debian',
release => "icinga-${::facts['lsbdistcodename']}",
repos => 'main',
key => {
id => 'F51A91A5EE001AA5D77D53C4C6E319C334410682',
source => 'http://packages.icinga.com/icinga.key',
};
}
}
'ubuntu': {
include ::apt
apt::source { 'icinga-stable-release':
location => 'http://packages.icinga.com/ubuntu',
release => "icinga-${::facts['lsbdistcodename']}",
repos => 'main',
key => {
id => 'F51A91A5EE001AA5D77D53C4C6E319C334410682',
source => 'http://packages.icinga.com/icinga.key',
};
}
}
default: {
fail('Your plattform is not supported to manage a repository.')
}
}
contain ::apt::update
}
'suse': {
file { '/etc/pki/GPG-KEY-icinga':
ensure => present,
source => 'http://packages.icinga.com/icinga.key',
}
exec { 'import icinga gpg key':
path => '/bin:/usr/bin:/sbin:/usr/sbin',
command => 'rpm --import /etc/pki/GPG-KEY-icinga',
unless => "rpm -q gpg-pubkey-`echo $(gpg --throw-keyids < /etc/pki/GPG-KEY-icinga) | cut --characters=11-18 | tr [A-Z] [a-z]`",
require => File['/etc/pki/GPG-KEY-icinga'],
logoutput => 'on_failure',
}
case $::facts['os']['name'] {
'SLES': {
zypprepo { 'icinga-stable-release':
baseurl => "http://packages.icinga.com/SUSE/${::facts['os']['release']['full']}/release/",
enabled => 1,
gpgcheck => 1,
require => Exec['import icinga gpg key']
}
}
default: {
fail('Your plattform is not supported to manage a repository.')
}
}
}
default: {
fail('Your plattform is not supported to manage a repository.')
}
}
} # if $::icinga::manage_repo
}
|