Showing with 14 additions and 9 deletions.
  1. +6 −1 CHANGELOG.md
  2. +2 −2 README.md
  3. +1 −1 metadata.json
  4. +5 −5 templates/filebeat5.yml.erb
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ Changelog
=========

## Unreleased
[Full Changelog](https://github.com/pcfens/puppet-filebeat/compare/v0.9.0...HEAD)
[Full Changelog](https://github.com/pcfens/puppet-filebeat/compare/v0.9.1...HEAD)

## [v0.9.1](https://github.com/pcfens/puppet-filebeat/tree/v0.9.1)
[Full Changelog](https://github.com/pcfens/puppet-filebeat/compare/v0.9.0...v0.9.1)

- Fix yaml syntax around filebeat processors [\#71](https://github.com/pcfens/puppet-filebeat/pull/71)

## [v0.9.0](https://github.com/pcfens/puppet-filebeat/tree/v0.9.0)
[Full Changelog](https://github.com/pcfens/puppet-filebeat/compare/v0.8.7...v0.9.0)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class{"filebeat":
processors => [
{
"name" => "drop_fields",
"params" => ["input_type", "offset"]
"params" => {"fields" => ["input_type", "offset"]}
},
],
}
Expand All @@ -184,7 +184,7 @@ class{"filebeat":
processors => [
{
"name" => "drop_fields",
"params" => ["input_type", "offset"]
"params" => {"fields" => ["input_type", "offset"]}
},
{
"name" => "drop_event",
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pcfens-filebeat",
"version": "0.9.0",
"version": "0.9.1",
"author": "pcfens",
"license": "Apache-2.0",
"summary": "A module to install and manage the filebeat log shipper",
Expand Down
10 changes: 5 additions & 5 deletions templates/filebeat5.yml.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<%-
def yaml_indent(conds, idx=4)
def yaml_indent(conds)
return_val = []
tmp_val = conds.to_yaml.split("\n")
tmp_val.delete('---')

tmp_val.each do |val|
return_val << " " + val
return_val << " " + val
end

return_val.join("\n")
Expand Down Expand Up @@ -79,13 +79,13 @@ max_procs: <%= @filebeat_config['max_procs'] %>
<%- unless @filebeat_config['processors'].empty? -%>
processors:
<%- @filebeat_config['processors'].each do |_proc| -%>
- <%= _proc['name'] %>:
- <%= _proc['name'] %>:
<%- unless _proc['when'].nil? or _proc['when'].empty? -%>
when:
when:
<%= yaml_indent(_proc['when']) %>
<%- end -%>
<%- _proc['params'].each do |key,val|-%>
<%= key %>: <%= val %>
<%= key %>: <%= val %>
<%- end -%>
<%- end -%>
<%- end -%>
Expand Down