2015-02-20 10:40:45 +01:00
|
|
|
# == Class icingaweb2::config
|
|
|
|
#
|
|
|
|
class icingaweb2::config {
|
2015-03-06 10:00:33 +01:00
|
|
|
assert_private()
|
|
|
|
|
2015-02-20 13:08:43 +01:00
|
|
|
@user { 'icingaweb2':
|
|
|
|
ensure => present,
|
|
|
|
home => $::icingaweb2::web_root,
|
|
|
|
managehome => true,
|
|
|
|
}
|
|
|
|
|
|
|
|
@group { 'icingaweb2':
|
|
|
|
ensure => present,
|
|
|
|
system => true,
|
|
|
|
}
|
|
|
|
|
|
|
|
realize(User['icingaweb2'])
|
|
|
|
realize(Group['icingaweb2'])
|
|
|
|
|
2015-02-20 10:40:45 +01:00
|
|
|
File {
|
|
|
|
require => Class['::icingaweb2::install'],
|
2015-02-23 10:49:32 +01:00
|
|
|
owner => $::icingaweb2::config_user,
|
|
|
|
group => $::icingaweb2::config_group,
|
|
|
|
mode => $::icingaweb2::config_file_mode,
|
2015-02-20 10:40:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
file {
|
|
|
|
$::icingaweb2::config_dir:
|
|
|
|
ensure => directory,
|
|
|
|
mode => $::icingaweb2::config_dir_mode,
|
|
|
|
recurse => $::icingaweb2::config_dir_recurse;
|
|
|
|
|
|
|
|
"${::icingaweb2::config_dir}/enabledModules":
|
|
|
|
ensure => directory;
|
|
|
|
|
|
|
|
"${::icingaweb2::config_dir}/modules":
|
|
|
|
ensure => directory;
|
|
|
|
|
|
|
|
"${::icingaweb2::config_dir}/authentication.ini":
|
|
|
|
ensure => present,
|
|
|
|
content => template('icingaweb2/authentication.ini.erb');
|
|
|
|
|
|
|
|
"${::icingaweb2::config_dir}/config.ini":
|
|
|
|
ensure => present,
|
|
|
|
content => template('icingaweb2/config.ini.erb');
|
|
|
|
|
|
|
|
"${::icingaweb2::config_dir}/resources.ini":
|
|
|
|
ensure => present,
|
|
|
|
content => template('icingaweb2/resources.ini.erb');
|
|
|
|
|
|
|
|
"${::icingaweb2::config_dir}/roles.ini":
|
|
|
|
ensure => present,
|
|
|
|
content => template('icingaweb2/roles.ini.erb');
|
2015-02-20 12:28:33 +01:00
|
|
|
|
|
|
|
$::icingaweb2::web_root:
|
2015-02-20 13:04:10 +01:00
|
|
|
ensure => directory,
|
|
|
|
mode => $::icingaweb2::config_dir_mode;
|
2015-02-20 10:40:45 +01:00
|
|
|
}
|
2015-02-20 15:50:42 +01:00
|
|
|
|
|
|
|
if $::icingaweb2::manage_apache_vhost {
|
|
|
|
::apache::custom_config { 'icingaweb2':
|
|
|
|
content => template('icingaweb2/apache2.conf.erb'),
|
|
|
|
}
|
|
|
|
}
|
2015-02-20 10:40:45 +01:00
|
|
|
}
|
|
|
|
|