From adb39eabf0c68c8ad2b8e6901d4fd606a7704b69 Mon Sep 17 00:00:00 2001 From: Max Wilhelm Date: Mon, 30 Nov 2015 17:17:54 +0100 Subject: [PATCH] added fluentd::config this class overwrites the installation default 'td-agent.conf' with and include of the created '/etc/td-agent/conf.d' directory. All sources, matches and filters will be placed as single files in '/etc/td-agent/conf.d'. --- files/td-agent.conf | 2 ++ manifests/config.pp | 19 +++++++++++++++++++ manifests/init.pp | 3 ++- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 files/td-agent.conf create mode 100644 manifests/config.pp diff --git a/files/td-agent.conf b/files/td-agent.conf new file mode 100644 index 0000000..ad82019 --- /dev/null +++ b/files/td-agent.conf @@ -0,0 +1,2 @@ +# Include config files in the ./conf.d directory +@include conf.d/*.conf diff --git a/manifests/config.pp b/manifests/config.pp new file mode 100644 index 0000000..2c00504 --- /dev/null +++ b/manifests/config.pp @@ -0,0 +1,19 @@ +# Configure package +# +class fluentd::config inherits fluentd { + + file { '/etc/td-agent/td-agent.conf' : + ensure => file, + owner => 'root', + group => 'root', + source => "puppet:///modules/fluentd/td-agent.conf" + } + + file {'/etc/td-agent/conf.d': + ensure => 'directory', + owner => 'td-agent', + group => 'td-agent', + mode => '0750', + } + +} diff --git a/manifests/init.pp b/manifests/init.pp index d1e68e0..23dbcdb 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -60,6 +60,7 @@ class fluentd ( class { '::fluentd::repo': } } - class { '::fluentd::install': } + class { '::fluentd::install': } -> + class { '::fluentd::config': } }