This isn't finished. If it looks like I'm going in the right direction (or can be steered that way!), I still have to add docs, examples and tests etc. Hopefully there's enough here for some early feedback. :)
I wanted a way that I could add extra pipelines without having to modify the pipelines
parameter passed to the base class each time.
This adds a defined type for adding pipelines and uses concat to write the pipelines.yml file. If you specify a content
or source
it'll also create the logstash::configfile
with the correct path (path.config
).
It aims to be backwards compatible. (An array of pipeline configs will still be written to the pipelines.yml as before).
Use logstashuser and logstashgroup as file owner.
Limit read access for others
Wrote a wrapper class to call the configfile defined type. Spec tests have also been written for the new functionality. README.md updated with usage examples.
Rspec tests complete successfully and Beaker tests complete successfully on nodesets CentOS 6+7. The Beaker tests do not start to run on the other nodesets with errors such as: "Couldn't find id: {"stream":"Step 1/18 : FROM library/ubuntu:16.04"}"
Tests appear to be broken.
I have been using some days now to try to fix all testing issues in the module.
To do this I started out by converting the module to PDK 1.18.1.
I have done my best to map existing setup, but there is some major changes.
I had to skip some acceptance tests in the plugin class for versions >= 6.7 because there have been a change
in the logstash-plugin command.
This command changed in two ways as I can see.
1: it now has to be run from the logstash homedir
2: new option --installed is needed to list only installed plugins
To solve this we either have to drop support for versions < 6.7, or implement a fact that hold the installed logstash version.
Please let me know what you think of my changes..
I really need this module back on track with java 11+ and logstash 7.
Ref #401
This PR is the rebased successor of #404.
otherwise if a server has ensure => false
but still calls logstash::configfile
for any reason the file will try to be created but fail bc /etc/logstash
does not exist
e.g. in your private base.pp
you say
include logstash
logstash::configfile {
...
}
but somewhere in hiera you don't want to install logstash
on a cluster so you have
logstash::ensure: absent