removing timeperiod_ from target/dir/file and mode
Signed-off-by: Nick Chappell <nick@intronic.org> Merged from: https://github.com/Icinga/puppet-icinga2/pull/37 refs#7217: https://dev.icinga.org/issues/7217
This commit is contained in:
parent
2059489c11
commit
9180f9a17e
1 changed files with 9 additions and 9 deletions
|
@ -17,9 +17,9 @@ define icinga2::object::timeperiod (
|
|||
$timeperiod_ranges = {},
|
||||
$timeperiod_target_dir = '/etc/icinga2/objects/timeperiods',
|
||||
$timeperiod_target_file_name = "${name}.conf",
|
||||
$timeperiod_target_file_owner = 'root',
|
||||
$timeperiod_target_file_group = 'root',
|
||||
$timeperiod_target_file_mode = '0644',
|
||||
$target_file_owner = 'root',
|
||||
$target_file_group = 'root',
|
||||
$target_file_mode = '0644',
|
||||
) {
|
||||
|
||||
# Do some validation of the class' parameters:
|
||||
|
@ -31,16 +31,16 @@ define icinga2::object::timeperiod (
|
|||
}
|
||||
validate_hash($timeperiod_ranges)
|
||||
validate_string($timeperiod_target_dir)
|
||||
validate_string($timeperiod_target_file_name)
|
||||
validate_string($timeperiod_target_file_owner)
|
||||
validate_string($timeperiod_target_file_group)
|
||||
validate_string($target_file_name)
|
||||
validate_string($target_file_owner)
|
||||
validate_string($target_file_group)
|
||||
validate_re($timeperiod_target_file_mode, '^\d{4}$')
|
||||
|
||||
file {"${timeperiod_target_dir}/${timeperiod_target_file_name}":
|
||||
ensure => file,
|
||||
owner => $timeperiod_target_file_owner,
|
||||
group => $timeperiod_target_file_group,
|
||||
mode => $timeperiod_target_file_mode,
|
||||
owner => $target_file_owner,
|
||||
group => $target_file_group,
|
||||
mode => $target_file_mode,
|
||||
content => template('icinga2/object_timeperiod.conf.erb'),
|
||||
notify => Service['icinga2'],
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue