puppet: Let icingaweb2::config::module() use the config path defined by hiera
This commit is contained in:
parent
513fbe6461
commit
bf68ecfa8c
|
@ -1,6 +1,25 @@
|
|||
define icingaweb2::config::module ($source, $module = 'monitoring', $replace = true) {
|
||||
icingaweb2::config::general { "modules/${module}/${name}":
|
||||
source => $source,
|
||||
define icingaweb2::config::module (
|
||||
$module,
|
||||
$source,
|
||||
$config = hiera('icingaweb2::config'),
|
||||
$replace = true
|
||||
) {
|
||||
include icingaweb2::config
|
||||
|
||||
if ! defined(File["${config}/modules/${module}"]) {
|
||||
file { "${config}/modules/${module}":
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
group => 'icingaweb',
|
||||
mode => '2770',
|
||||
}
|
||||
}
|
||||
|
||||
file { "${config}/modules/${module}/${name}.ini":
|
||||
source => "${source}/modules/${module}/${name}.ini",
|
||||
owner => 'root',
|
||||
group => 'icingaweb',
|
||||
mode => 0660,
|
||||
replace => $replace,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue