puppet: Let icingaweb2::config::general() use the config path defined by hiera
This commit is contained in:
parent
9446117517
commit
513fbe6461
|
@ -1,21 +1,15 @@
|
|||
define icingaweb2::config::general ($source, $replace = true) {
|
||||
include apache
|
||||
include icingaweb2
|
||||
define icingaweb2::config::general (
|
||||
$source,
|
||||
$config = hiera('icingaweb2::config'),
|
||||
$replace = true
|
||||
) {
|
||||
include icingaweb2::config
|
||||
|
||||
$path = "/etc/icingaweb/${name}.ini"
|
||||
|
||||
parent_dirs { $path:
|
||||
user => 'apache',
|
||||
require => [
|
||||
Class['apache'],
|
||||
File['icingaweb2cfgDir']
|
||||
],
|
||||
}
|
||||
-> file { $path:
|
||||
source => "${source}/${name}.ini",
|
||||
owner => 'apache',
|
||||
group => 'apache',
|
||||
replace => $replace,
|
||||
require => Class['apache'],
|
||||
file { "${config}/${name}.ini":
|
||||
source => "${source}/${name}.ini",
|
||||
owner => 'root',
|
||||
group => 'icingaweb',
|
||||
mode => 0660,
|
||||
replace => $replace,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue