Merged in support for Red Hat operating systems.
Merged in from: https://github.com/Icinga/puppet-icinga2/pull/83/
This commit is contained in:
parent
9b3abbd2ff
commit
099b308c4d
5 changed files with 39 additions and 14 deletions
|
@ -38,6 +38,15 @@ For Ubuntu systems, this module requires the [Puppet Labs apt module](https://gi
|
||||||
|
|
||||||
On EL-based systems (CentOS, Red Hat Enterprise Linux, Fedora, etc.), the [EPEL package repository](https://fedoraproject.org/wiki/EPEL) is required. You can also use the [icinga2::nrpe class](#nrpe-usage) to set up NRPE on CentOS 5. It is discouraged to set up Icinga2 Server on this old of a distribution. You are encouraged to use at least CentOS 6 or higher.
|
On EL-based systems (CentOS, Red Hat Enterprise Linux, Fedora, etc.), the [EPEL package repository](https://fedoraproject.org/wiki/EPEL) is required. You can also use the [icinga2::nrpe class](#nrpe-usage) to set up NRPE on CentOS 5. It is discouraged to set up Icinga2 Server on this old of a distribution. You are encouraged to use at least CentOS 6 or higher.
|
||||||
|
|
||||||
|
####Note for RedHat
|
||||||
|
|
||||||
|
If you are using RedHat Satellite server, set
|
||||||
|
<pre>
|
||||||
|
$manage_repos = false
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
in `icinga2::server` class and make sure, you have a channel set up with the contents of the icinga2 repository and the needed packages from EPEL. If you leave it at true, the EPEL repository will be used directly.
|
||||||
|
|
||||||
If you would like to use the `icinga2::object` defined types as [exported resources](https://docs.puppetlabs.com/guides/exported_resources.html), you'll need to have your Puppet master set up with PuppetDB. See the Puppet Labs documentation for more info: [Docs: PuppetDB](https://docs.puppetlabs.com/puppetdb/)
|
If you would like to use the `icinga2::object` defined types as [exported resources](https://docs.puppetlabs.com/guides/exported_resources.html), you'll need to have your Puppet master set up with PuppetDB. See the Puppet Labs documentation for more info: [Docs: PuppetDB](https://docs.puppetlabs.com/puppetdb/)
|
||||||
|
|
||||||
###Server requirements
|
###Server requirements
|
||||||
|
|
|
@ -18,14 +18,20 @@ class icinga2::params {
|
||||||
##################
|
##################
|
||||||
# Icinga 2 common package parameters
|
# Icinga 2 common package parameters
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
#CentOS systems:
|
#CentOS or RedHat systems:
|
||||||
'CentOS', 'RedHat': {
|
'CentOS', 'RedHat': {
|
||||||
|
#Pick the right package provider:
|
||||||
|
$package_provider = 'yum'
|
||||||
|
}
|
||||||
|
|
||||||
|
#RedHat systems:
|
||||||
|
'RedHat': {
|
||||||
#Pick the right package provider:
|
#Pick the right package provider:
|
||||||
$package_provider = 'yum'
|
$package_provider = 'yum'
|
||||||
}
|
}
|
||||||
|
|
||||||
#Ubuntu systems:
|
#Ubuntu systems:
|
||||||
'Ubuntu': {
|
'Ubuntu': {
|
||||||
#Pick the right package provider:
|
#Pick the right package provider:
|
||||||
$package_provider = 'apt'
|
$package_provider = 'apt'
|
||||||
}
|
}
|
||||||
|
@ -95,9 +101,9 @@ class icinga2::params {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#Ubuntu systems:
|
#Ubuntu systems:
|
||||||
'Ubuntu': {
|
'Ubuntu': {
|
||||||
case $::operatingsystemrelease {
|
case $::operatingsystemrelease {
|
||||||
#Ubuntu 12.04 doesn't have nagios-plugins-common or nagios-plugins-contrib packages available...
|
#Ubuntu 12.04 doesn't have nagios-plugins-common or nagios-plugins-contrib packages available...
|
||||||
'12.04': {
|
'12.04': {
|
||||||
$icinga2_server_package = 'icinga2'
|
$icinga2_server_package = 'icinga2'
|
||||||
|
@ -143,7 +149,7 @@ class icinga2::params {
|
||||||
# Icinga 2 server config parameters
|
# Icinga 2 server config parameters
|
||||||
|
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
#CentOS systems:
|
#CentOS or RedHat systems:
|
||||||
'CentOS', 'RedHat': {
|
'CentOS', 'RedHat': {
|
||||||
#Settings for /etc/icinga2/:
|
#Settings for /etc/icinga2/:
|
||||||
$etc_icinga2_owner = 'icinga'
|
$etc_icinga2_owner = 'icinga'
|
||||||
|
@ -322,6 +328,7 @@ class icinga2::params {
|
||||||
$nrpe_user = 'nrpe'
|
$nrpe_user = 'nrpe'
|
||||||
$nrpe_group = 'nrpe'
|
$nrpe_group = 'nrpe'
|
||||||
}
|
}
|
||||||
|
|
||||||
#File and template variable names for Ubuntu systems:
|
#File and template variable names for Ubuntu systems:
|
||||||
'Ubuntu': {
|
'Ubuntu': {
|
||||||
$nrpe_config_basedir = '/etc/nagios'
|
$nrpe_config_basedir = '/etc/nagios'
|
||||||
|
@ -331,6 +338,7 @@ class icinga2::params {
|
||||||
$nrpe_user = 'nagios'
|
$nrpe_user = 'nagios'
|
||||||
$nrpe_group = 'nagios'
|
$nrpe_group = 'nagios'
|
||||||
}
|
}
|
||||||
|
|
||||||
#File and template variable names for Ubuntu systems:
|
#File and template variable names for Ubuntu systems:
|
||||||
'Debian': {
|
'Debian': {
|
||||||
$nrpe_config_basedir = '/etc/nagios'
|
$nrpe_config_basedir = '/etc/nagios'
|
||||||
|
@ -340,14 +348,15 @@ class icinga2::params {
|
||||||
$nrpe_user = 'nagios'
|
$nrpe_user = 'nagios'
|
||||||
$nrpe_group = 'nagios'
|
$nrpe_group = 'nagios'
|
||||||
}
|
}
|
||||||
#Fail if we're on any other OS:
|
|
||||||
|
#Fail if we're on any other OS:
|
||||||
default: { fail("${::operatingsystem} is not supported!") }
|
default: { fail("${::operatingsystem} is not supported!") }
|
||||||
}
|
}
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# Icinga 2 client package parameters
|
# Icinga 2 client package parameters
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
#CentOS systems:
|
#CentOS or RedHat systems:
|
||||||
'CentOS', 'RedHat': {
|
'CentOS', 'RedHat': {
|
||||||
case $::operatingsystemmajrelease {
|
case $::operatingsystemmajrelease {
|
||||||
'5': {
|
'5': {
|
||||||
|
|
|
@ -44,7 +44,7 @@ class icinga2::server (
|
||||||
|
|
||||||
#Pick set the right path where we can find the DB schema based on the OS...
|
#Pick set the right path where we can find the DB schema based on the OS...
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
'CentOS': {
|
'CentOS','RedHat': {
|
||||||
#...and database that the user picks
|
#...and database that the user picks
|
||||||
case $server_db_type {
|
case $server_db_type {
|
||||||
'mysql': { $server_db_schema_path = '/usr/share/icinga2-ido-mysql/schema/mysql.sql' }
|
'mysql': { $server_db_schema_path = '/usr/share/icinga2-ido-mysql/schema/mysql.sql' }
|
||||||
|
|
|
@ -32,9 +32,8 @@ class icinga2::server::install::repos inherits icinga2::server {
|
||||||
|
|
||||||
if $manage_repos == true {
|
if $manage_repos == true {
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
#CentOS systems:
|
#CentOS or RedHat systems:
|
||||||
'CentOS', 'RedHat': {
|
'CentOS', 'RedHat': {
|
||||||
|
|
||||||
#Add the official Icinga Yum repository: http://packages.icinga.org/epel/
|
#Add the official Icinga Yum repository: http://packages.icinga.org/epel/
|
||||||
yumrepo { 'icinga2_yum_repo':
|
yumrepo { 'icinga2_yum_repo':
|
||||||
baseurl => "http://packages.icinga.org/epel/${::operatingsystemmajrelease}/release/",
|
baseurl => "http://packages.icinga.org/epel/${::operatingsystemmajrelease}/release/",
|
||||||
|
@ -45,8 +44,8 @@ class icinga2::server::install::repos inherits icinga2::server {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#Ubuntu systems:
|
#Ubuntu systems:
|
||||||
'Ubuntu': {
|
'Ubuntu': {
|
||||||
#Include the apt module's base class so we can...
|
#Include the apt module's base class so we can...
|
||||||
include apt
|
include apt
|
||||||
#...use the apt module to add the Icinga 2 PPA from launchpad.net:
|
#...use the apt module to add the Icinga 2 PPA from launchpad.net:
|
||||||
|
|
|
@ -16,6 +16,14 @@
|
||||||
"7"
|
"7"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"operatingsystem": "RedHat",
|
||||||
|
"operatingsystemmajrelease": [
|
||||||
|
"5",
|
||||||
|
"6",
|
||||||
|
"7"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"operatingsystem": "Debian",
|
"operatingsystem": "Debian",
|
||||||
"operatingsystemmajrelease": [
|
"operatingsystemmajrelease": [
|
||||||
|
|
Loading…
Reference in a new issue