Created
July 16, 2013 16:04
-
-
Save slamont/6010094 to your computer and use it in GitHub Desktop.
The install.pp that is used
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
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