mirror of
https://github.com/krislamo/puppet-fluentd
synced 2024-12-16 13:20:35 +00:00
added fluentd::source definition
This commit is contained in:
parent
b79c8bfd25
commit
ce9a65a4e4
@ -4,7 +4,7 @@
|
|||||||
define fluentd::config::file (
|
define fluentd::config::file (
|
||||||
$ensure = present,
|
$ensure = present,
|
||||||
$priority = 50,
|
$priority = 50,
|
||||||
$content,
|
$content = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
$base_name = "${title}.conf"
|
$base_name = "${title}.conf"
|
||||||
|
13
manifests/source.pp
Normal file
13
manifests/source.pp
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Configure a fluentd source
|
||||||
|
#
|
||||||
|
define fluentd::source (
|
||||||
|
$ensure = present,
|
||||||
|
$priority = 10,
|
||||||
|
$config = {},
|
||||||
|
) {
|
||||||
|
fluentd::config::file { "source-${title}":
|
||||||
|
ensure => $ensure,
|
||||||
|
priority => $priority,
|
||||||
|
content => template( 'fluentd/source.erb'),
|
||||||
|
}
|
||||||
|
}
|
5
templates/source.erb
Normal file
5
templates/source.erb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<source>
|
||||||
|
<% @config.each do |key, val| -%>
|
||||||
|
<%= key -%> <%= val %>
|
||||||
|
<% end -%>
|
||||||
|
</source>
|
Loading…
Reference in New Issue
Block a user