Merge branch 'develop'

This commit is contained in:
Nick Chappell 2014-06-28 22:36:24 -07:00
commit ea1909bad0
5 changed files with 165 additions and 0 deletions

59
manifests/params.pp Normal file
View file

@ -0,0 +1,59 @@
# == Class: icinga2::params
#
# This class contains config options and settings for use elsewhere in the module.
#
# === Parameters
#
# See the inline comments.
#
class icinga2::params {
##############################
# Package parameters
##############################
#Whether to manage the package repositories
$manage_repos = 'true'
##############################
# Icinga 2 server package parameters
$server_db_type = 'pgsql'
case $operatingsystem {
#Red Hat/CentOS systems:
'RedHat', 'CentOS': {
#Pick the right package provider:
$package_provider = 'yum'
#Icinga 2 server package
$icinga2_server_package = 'icinga2'
}
#Debian/Ubuntu systems:
/^(Debian|Ubuntu)$/: {
#Pick the right package provider:
$package_provider = 'apt'
#Icinga 2 server package
$icinga2_server_package = 'icinga2'
#Set some package repo variables based on the Ubuntu release:
case $operatingsystemrelease {
#For Ubuntu 12.04 Precise Pangolin: http://releases.ubuntu.com/12.04/
'12.04': {
}
#For Ubuntu 14.04 Trusty Tahr: http://releases.ubuntu.com/14.04/
'14.04': {
}
#Fail if we are on any other Ubuntu release:
default: { fail("${operatingsystem} ${operatingsystemrelease} is not a supported Ubuntu release!") }
}
}
#Fail if we're on any other OS:
default: { fail("${operatingsystem} is not supported!") }
}
}

25
manifests/server.pp Normal file
View file

@ -0,0 +1,25 @@
# == Class: icinga2::server
#
# This module installs and configures the server components for the Icinga 2 monitoring system.
#
# === Parameters
#
# Coming soon...
#
# === Examples
#
# Coming soon...
#
class icinga2::server (
$server_db_type = $icinga2::params::server_db_type
) inherits icinga2::params {
#Apply our classes in the right order. Use the squiggly arrows (~>) to ensure that the
#class left is applied before the class on the right and that it also refreshes the
#class on the right.
class {'icinga2::server::install':} #~>
#class {'icinga2::server::config':} ~>
#class {'icinga2::server::service':}
}

View file

@ -0,0 +1,18 @@
# == Class: icinga2::server::config
#
# This class configures the server components for the Icinga 2 monitoring system.
#
# === Parameters
#
# Coming soon...
#
# === Examples
#
# Coming soon...
#
class icinga2::server::config inherits icinga2::server {
include icinga2::params
}

View file

@ -0,0 +1,45 @@
# == Class: icinga2::server::install
#
# This class installs the server components for the Icinga 2 monitoring system.
#
# === Parameters
#
# Coming soon...
#
# === Examples
#
# Coming soon...
#
class icinga2::server::install inherits icinga2::server {
include icinga2::params
#Apply our classes in the right order. Use the squiggly arrows (~>) to ensure that the
#class left is applied before the class on the right and that it also refreshes the
#class on the right.
#
#Here, we're setting up the package repos first, then installing the packages:
class{'icinga2::server::install::repos':} ~>
class{'icinga2::server::install::packages':} ~>
class{'icinga2::server::install::execs':} ->
Class['icinga2::server::install']
}
class icinga2::server::install::repos inherits icinga2::server {
include icinga2::params
}
class icinga2::server::install::packages inherits icinga2::server {
include icinga2::params
}
class icinga2::server::install::execs inherits icinga2::server {
include icinga2::params
}

View file

@ -0,0 +1,18 @@
# == Class: icinga2::server::service
#
# This class mangages the daemons of the server components for the Icinga 2 monitoring system.
#
# === Parameters
#
# Coming soon...
#
# === Examples
#
# Coming soon...
#
class icinga2::server::service inherits icinga2::server {
include icinga2::params
}