1
0
mirror of https://github.com/krislamo/puppet-fluentd synced 2025-09-11 16:19:29 +00:00

parameterized config path, dir, file and user/group

This commit is contained in:
Max Wilhelm
2015-12-04 14:20:11 +01:00
parent 43cfae7797
commit 9d2175411b
5 changed files with 22 additions and 11 deletions

View File

@@ -13,13 +13,12 @@ define fluentd::config::file (
$base_name = "${title}.conf"
$config_name = "${priority}-${base_name}"
$base_path = "/etc/td-agent/conf.d"
$config_path = "${base_path}/${config_name}"
$config_path = "${::fluentd::conf_dir}/${config_name}"
# clean up to ensure priority changes take effect
exec { "apply priority change for ${base_name}":
command => "rm ${base_path}/*-${base_name}",
onlyif => "ls ${base_path}/*-${base_name} | grep -v ${config_name}",
command => "rm ${::fluentd::conf_dir}/*-${base_name}",
onlyif => "ls ${::fluentd::conf_dir}/*-${base_name} | grep -v ${config_name}",
before => File[$config_path],
notify => Class['Fluentd::Service'],
}