Showing with 31 additions and 9 deletions.
  1. +6 −0 CHANGELOG.md
  2. +7 −0 README.md
  3. +0 −7 manifests/repo.pp
  4. +1 −1 metadata.json
  5. +8 −0 spec/acceptance/001_basic_spec.rb
  6. +8 −0 spec/acceptance/002_generic_template_spec.rb
  7. +1 −1 templates/filebeat5.yml.erb
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Changelog
## Unreleased
[Full Changelog](https://github.com/pcfens/puppet-filebeat/compare/v0.7.4...HEAD)

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

- Don't manage the apt-transport-https package on Debian systems [\49](https://github.com/pcfens/puppet-filebeat/pull/49)
- undefined values shouldn't be rendered by the filebeat5 template [\50](https://github.com/pcfens/puppet-filebeat/pull/50)

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

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ package repositories, but won't update the package itself. To update the package
Windows users should set `major_version` to 5 and update the `download_url` parameter to the correct
[download](https://www.elastic.co/downloads/beats/filebeat).

If you're on a Debian based system, you need to make sure that the apt-transport-https package
is installed if you want this module to manage the repository for you (it does by default).

### Setup Requirements

The `filebeat` module depends on [`puppetlabs/stdlib`](https://forge.puppetlabs.com/puppetlabs/stdlib), and on
Expand Down Expand Up @@ -286,6 +289,10 @@ When installing on Windows, there's an expectation that `C:\Temp` already exists
location specified in the `tmp_dir` parameter exists and is writable by puppet. The temp directory
is used to store the downloaded installer only.

### Debian Systems

Filebeat 5.x and newer requires apt-transport-https, but this module won't install it for you.

### Pre-1.9.1 Ruby
If you're on a system running a Ruby pre-1.9.1, hashes aren't sorted consistently, causing puppet runs to
not be idempotent. To fix this, a limited template is used if the rubyversion is pre-1.9.1.
Expand Down
7 changes: 0 additions & 7 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@
'Debian': {
include ::apt

# Install apt-transport-https if it's not already managed elsewhere
if !defined(Package['apt-transport-https']){
package { 'apt-transport-https':
ensure => present,
before => Class['apt::update'],
}
}
Class['apt::update'] -> Package['filebeat']

if !defined(Apt::Source['beats']){
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.8.0",
"version": "0.8.1",
"author": "pcfens",
"license": "Apache-2.0",
"summary": "A module to install and manage the filebeat log shipper",
Expand Down
8 changes: 8 additions & 0 deletions spec/acceptance/001_basic_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@

let(:pp) do
<<-EOS
if $::osfamily == 'Debian' {
include ::apt
package { 'apt-transport-https':
ensure => present,
}
}
class { 'filebeat':
outputs => {
'logstash' => {
Expand Down
8 changes: 8 additions & 0 deletions spec/acceptance/002_generic_template_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@

let(:pp) do
<<-EOS
if $::osfamily == 'Debian' {
include ::apt
package { 'apt-transport-https':
ensure => present,
}
}
class { 'filebeat':
use_generic_template => true,
outputs => {
Expand Down
2 changes: 1 addition & 1 deletion templates/filebeat5.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ queue_size: <%= @filebeat_config['queue_size'] %>
# Do not modify this value.
#bulk_queue_size: 0

<%- if @filebeat_config['max_procs'] != nil -%>
<%- if @filebeat_config['max_procs'] != :undef -%>
max_procs: <%= @filebeat_config['max_procs'] %>
<%- end -%>

Expand Down