class icinga2_testing::profiles::icingaweb2 { include ::icinga2_testing::profiles::apache if $::operatingsystem == 'CentOS' { ensure_packages(['centos-release-scl']) Package['centos-release-scl'] -> Class['::icingaweb2'] $_use_fpm = true $_fpm_service = 'rh-php71-php-fpm' } else { $_use_fpm = false } if $_use_fpm { # TODO: improve FPM handling service { 'php-fpm': ensure => running, enable => true, name => $_fpm_service, require => Package['icingaweb2'], } contain ::apache::mod::proxy contain ::apache::mod::proxy_fcgi } include ::apache ::apache::custom_config { 'icingaweb2': content => template('icinga2_testing/icingaweb2/apache2.conf.erb'), } class { '::icingaweb2': manage_apache_vhost => false, manage_repo => false, install_method => 'package', } contain ::icingaweb2 contain ::icingaweb2::mod::monitoring # TODO: contain ::icingaweb2::mod::doc file { 'icingaweb2 enable doc': ensure => link, path => "${::icingaweb2::config_dir}/enabledModules/doc", target => "${::icingaweb2::web_root}/modules/doc", } create_resources('icinga2_testing::profiles::icingaweb2::backend_group', hiera_hash('icingaweb2::backend_groups', {})) create_resources('icingaweb2::config::roles', hiera_hash('icingaweb2::roles', {})) }