Skip to content

Instantly share code, notes, and snippets.

@slamont
Created July 16, 2013 16:04
Show Gist options
  • Save slamont/6010094 to your computer and use it in GitHub Desktop.
Save slamont/6010094 to your computer and use it in GitHub Desktop.
The install.pp that is used
#
class icinga::install {
include icinga::params
# To use apt::ppa we need to include the apt class
include apt
case $::osfamily {
'RedHat': {
package { ['icinga',"icinga-idoutils-libdbi-${icinga::params::ido_db_server}"]:
ensure => installed,
}
if ( $icinga::params::gui_type =~ /^(classic|both)$/ ) {
package { 'icinga-gui': ensure => installed }
}
if ( $icinga::params::gui_type =~ /^(web|both)$/ ) {
package { 'icinga-web': ensure => installed }
package { ['php-soap','php-gd','php-ldap','php-mysql']: ensure => installed }
}
}
'Debian': {
apt::ppa { 'ppa:formorer/icinga': }
if $icinga::params::gui_type =~ /^(web|both)$/ {
apt::ppa { 'ppa:formorer/icinga-web': }
package { 'icinga-web':
ensure => installed,
}
}
package { ['icinga', 'icinga-idoutils']:
ensure => installed,
}
}
default: {
fail("Only support Red Hat and Debian type systems, not ${::osfamily}")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment