|
@@ -30,36 +30,38 @@ class icinga2::server::install::repos inherits icinga2::server {
|
|
|
|
|
|
include icinga2::server
|
|
|
|
|
|
- case $operatingsystem {
|
|
|
- #Red Hat/CentOS systems:
|
|
|
- 'RedHat', 'CentOS': {
|
|
|
-
|
|
|
- #Add the official Icinga Yum repository: http://packages.icinga.org/epel/
|
|
|
- yumrepo { 'icinga2_yum_repo':
|
|
|
- baseurl => "http://packages.icinga.org/epel/${operatingsystemmajrelease}/release/",
|
|
|
- descr => "Icinga 2 Yum repository",
|
|
|
- enabled => 1,
|
|
|
- gpgcheck => 1,
|
|
|
- gpgkey => 'http://packages.icinga.org/icinga.key'
|
|
|
+ if $manage_repos == true {
|
|
|
+ case $::operatingsystem {
|
|
|
+ #Red Hat/CentOS systems:
|
|
|
+ 'RedHat', 'CentOS': {
|
|
|
+
|
|
|
+ #Add the official Icinga Yum repository: http://packages.icinga.org/epel/
|
|
|
+ yumrepo { 'icinga2_yum_repo':
|
|
|
+ baseurl => "http://packages.icinga.org/epel/${::operatingsystemmajrelease}/release/",
|
|
|
+ descr => 'Icinga 2 Yum repository',
|
|
|
+ enabled => 1,
|
|
|
+ gpgcheck => 1,
|
|
|
+ gpgkey => 'http://packages.icinga.org/icinga.key'
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- #Debian/Ubuntu systems:
|
|
|
- /^(Debian|Ubuntu)$/: {
|
|
|
- #Add the Icinga 2 snapshots apt repo for Ubuntu Saucy Salamander:
|
|
|
- apt::source { "icinga2_ubuntu_${lsbdistcodename}_release_apt":
|
|
|
- location => 'http://packages.icinga.org/ubuntu',
|
|
|
- release => "icinga-${lsbdistcodename}",
|
|
|
- repos => 'main',
|
|
|
- required_packages => 'debian-keyring debian-archive-keyring',
|
|
|
- key => '34410682',
|
|
|
- key_source => 'http://packages.icinga.org/icinga.key',
|
|
|
- include_src => true
|
|
|
+
|
|
|
+ #Debian/Ubuntu systems:
|
|
|
+ /^(Debian|Ubuntu)$/: {
|
|
|
+ #Add the Icinga 2 snapshots apt repo for Ubuntu Saucy Salamander:
|
|
|
+ apt::source { "icinga2_ubuntu_${::lsbdistcodename}_release_apt":
|
|
|
+ location => 'http://packages.icinga.org/ubuntu',
|
|
|
+ release => "icinga-${::lsbdistcodename}",
|
|
|
+ repos => 'main',
|
|
|
+ required_packages => 'debian-keyring debian-archive-keyring',
|
|
|
+ key => '34410682',
|
|
|
+ key_source => 'http://packages.icinga.org/icinga.key',
|
|
|
+ include_src => true
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+ #Fail if we're on any other OS:
|
|
|
+ default: { fail("${::operatingsystem} is not supported!") }
|
|
|
}
|
|
|
-
|
|
|
- #Fail if we're on any other OS:
|
|
|
- default: { fail("${operatingsystem} is not supported!") }
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -148,4 +150,4 @@ class icinga2::server::install::execs inherits icinga2::server {
|
|
|
|
|
|
default: { fail("${server_db_type} is not supported!") }
|
|
|
}
|
|
|
-}
|
|
|
+}
|