Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8391001
repo.pp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
repo.pp
View Options
# == Class: icinga2::repo
#
# This class manages the packages.icinga.org repository based on the operating system. Windows is not supported, as the
# Icinga Project does not offer a chocolate repository.
#
# === Parameters
#
# This class does not provide any parameters.
# To control the behaviour of this class, have a look at the parameters:
# * icinga2::manage_repo
#
# === Examples
#
# This class is private and should not be called by others than this module.
#
# === Authors
#
# Icinga Development Team <info@icinga.org>
#
class
icinga2
::
repo
{
if
$module_name
!=
$caller_module_name
{
fail
(
"icinga2::repo is a private class of the module icinga2, you're not permitted to use it."
)
}
if
$::icinga2::manage_repo
{
case
$::osfamily
{
'redhat'
:
{
case
$::operatingsystem
{
'centos'
,
'redhat'
:
{
yumrepo
{
'icinga-stable-release'
:
baseurl
=>
"http://packages.icinga.org/epel/${::operatingsystemmajrelease}/release/"
,
descr
=>
'ICINGA (stable release for epel)'
,
enabled
=>
1
,
gpgcheck
=>
1
,
gpgkey
=>
'http://packages.icinga.org/icinga.key'
,
}
}
default
:
{
fail
(
'Your plattform is not supported to manage a repository.'
)
}
}
}
'debian'
:
{
case
$::operatingsystem
{
'debian'
:
{
include
::
apt
,
::
apt
::
backports
apt
::
source
{
'icinga-stable-release'
:
location
=>
'http://packages.icinga.org/debian'
,
release
=>
"icinga-${::lsbdistcodename}"
,
repos
=>
'main'
,
key_source
=>
'http://packages.icinga.org/icinga.key'
,
key
=>
'F51A91A5EE001AA5D77D53C4C6E319C334410682'
,
include_src
=>
false
,
}
}
'ubuntu'
:
{
include
::
apt
apt
::
source
{
'icinga-stable-release'
:
location
=>
'http://packages.icinga.org/ubuntu'
,
release
=>
"icinga-${::lsbdistcodename}"
,
repos
=>
'main'
,
key_source
=>
'http://packages.icinga.org/icinga.key'
,
key
=>
'F51A91A5EE001AA5D77D53C4C6E319C334410682'
,
include_src
=>
false
,
}
}
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.org/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
$::operatingsystem
{
'SLES'
:
{
zypprepo
{
'icinga-stable-release'
:
baseurl
=>
"http://packages.icinga.com/SUSE/${::operatingsystemrelease}/release/"
,
enabled
=>
1
,
gpgcheck
=>
1
,
require
=>
Exec
[
'import icinga gpg key'
]
}
}
default
:
{
fail
(
'Your plattform is not supported to manage a repository.'
)
}
}
}
'windows'
:
{
warning
(
"The Icinga Project doesn't offer chocolaty packages at the moment."
)
}
default
:
{
fail
(
'Your plattform is not supported to manage a repository.'
)
}
}
}
# if $::icinga::manage_repo
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Jun 4 2025, 6:37 PM (14 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3374018
Attached To
rSPICI Icinga 2 Puppet Module
Event Timeline
Log In to Comment