From 4630991973b6cf6f86f8f01a89cb753c2cb4990b Mon Sep 17 00:00:00 2001 From: Joern Ott Date: Tue, 5 Jun 2018 11:21:01 +0000 Subject: [PATCH 01/10] Fix static home directory --- manifests/init.pp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index c63a6068..a7dc602e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -48,6 +48,9 @@ # @param [Integer] download_timeout # Timeout, in seconds, for http, https, and ftp downloads. # +# @param [String] home_dir +# The home directory for logstash. +# # @param [String] logstash_user # The user that Logstash should run as. This also controls file ownership. # @@ -143,6 +146,7 @@ $package_url = undef, $package_name = 'logstash', Integer $download_timeout = 600, + $home_dir = '/usr/share/logstash', $logstash_user = 'logstash', $logstash_group = 'logstash', $config_dir = '/etc/logstash', @@ -155,8 +159,6 @@ Boolean $manage_repo = true, ) { - $home_dir = '/usr/share/logstash' - if ! ($ensure in [ 'present', 'absent' ]) { fail("\"${ensure}\" is not a valid ensure parameter value") } From f65082d40aaac2f4fe15977fff5c9a64e599a6d9 Mon Sep 17 00:00:00 2001 From: Joern Ott Date: Wed, 6 Jun 2018 07:33:56 +0000 Subject: [PATCH 02/10] contain child classes to prevent floating --- manifests/init.pp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index a7dc602e..6367bd08 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -170,7 +170,11 @@ if ($manage_repo == true) { include elastic_stack::repo } - include logstash::package - include logstash::config - include logstash::service + contain logstash::package + contain logstash::config + contain logstash::service + + Class['logstash::package'] -> + Class['logstash::config'] -> + Class['logstash::service'] } From 6626f31d896ca729894f6f7c0903c90b89f0f913 Mon Sep 17 00:00:00 2001 From: Joern Ott Date: Wed, 6 Jun 2018 07:55:28 +0000 Subject: [PATCH 03/10] Update readme for home_dir --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 3df851bd..ad92b2c5 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,14 @@ class { 'logstash': } ``` +### Use a different logstash home +``` puppet +class { 'logstash': + home_dir => '/opt/logstash', +} +``` + + ### Do not run as a service ``` puppet class { 'logstash': From 1f063a57a1892f1135fdd1ac1c91a323bc74a185 Mon Sep 17 00:00:00 2001 From: Joern Ott Date: Wed, 6 Jun 2018 09:56:15 +0000 Subject: [PATCH 04/10] Fulfill lint requirements --- manifests/init.pp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 6367bd08..deda6696 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -173,8 +173,8 @@ contain logstash::package contain logstash::config contain logstash::service - - Class['logstash::package'] -> - Class['logstash::config'] -> - Class['logstash::service'] + + Class['logstash::package'] + -> Class['logstash::config'] + -> Class['logstash::service'] } From 35e6ed9e7e32a9d140779ba1e108cec1198d8143 Mon Sep 17 00:00:00 2001 From: Joern Ott Date: Wed, 6 Jun 2018 12:31:29 +0000 Subject: [PATCH 05/10] Remove empty line to trigger a new travis build after timeouts --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index ad92b2c5..8209a77d 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,6 @@ class { 'logstash': } ``` - ### Do not run as a service ``` puppet class { 'logstash': From b3468852c87e9334b7176b47bd540bf52da801ec Mon Sep 17 00:00:00 2001 From: Joern Ott Date: Tue, 27 Aug 2019 13:03:37 +0000 Subject: [PATCH 06/10] Fix lin error in travis test #1 --- Vagrantfile.d/manifests/site.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vagrantfile.d/manifests/site.pp b/Vagrantfile.d/manifests/site.pp index d2d0eaae..fdf0e1b0 100644 --- a/Vagrantfile.d/manifests/site.pp +++ b/Vagrantfile.d/manifests/site.pp @@ -32,5 +32,5 @@ } logstash::plugin { 'logstash-input-mysql': - environment => ['LS_JAVA_OPTS=-Xms1g -Xmx1g'] + environment => ['LS_JAVA_OPTS=-Xms1g -Xmx1g'], } From 1261bd189b078db27ff29408e3d5a72029accb64 Mon Sep 17 00:00:00 2001 From: Joern Ott Date: Mon, 27 Jun 2022 09:52:08 +0200 Subject: [PATCH 07/10] Update manifests/init.pp Co-authored-by: Ewoud Kohl van Wijngaarden --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 9c1ead14..7321d57e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -48,7 +48,7 @@ # @param [Integer] download_timeout # Timeout, in seconds, for http, https, and ftp downloads. # -# @param [String] home_dir +# @param home_dir # The home directory for logstash. # # @param [String] logstash_user From ef91dc5face2b61621c6af89753d85d40447a640 Mon Sep 17 00:00:00 2001 From: Joern Ott Date: Mon, 27 Jun 2022 09:52:22 +0200 Subject: [PATCH 08/10] Update manifests/init.pp Co-authored-by: Ewoud Kohl van Wijngaarden --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 7321d57e..83ac2fc5 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -146,7 +146,7 @@ $package_url = undef, $package_name = 'logstash', Integer $download_timeout = 600, - $home_dir = '/usr/share/logstash', + Stdlib::Absolutepath $home_dir = '/usr/share/logstash', $logstash_user = 'logstash', $logstash_group = 'logstash', $config_dir = '/etc/logstash', From cddbb91655f88395f6d2e24ab9be0f18ce712c0d Mon Sep 17 00:00:00 2001 From: Joern Ott Date: Mon, 27 Jun 2022 09:58:39 +0200 Subject: [PATCH 09/10] Revert contain pattern --- manifests/init.pp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 83ac2fc5..51911882 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -171,11 +171,7 @@ if ($manage_repo == true) { include elastic_stack::repo } - contain logstash::package - contain logstash::config - contain logstash::service - - Class['logstash::package'] - -> Class['logstash::config'] - -> Class['logstash::service'] + include logstash::package + include logstash::config + include logstash::service } From 1c1ef89335de202a6250ba938fb265eaed77656b Mon Sep 17 00:00:00 2001 From: Joern Ott Date: Thu, 30 Jun 2022 16:23:25 +0200 Subject: [PATCH 10/10] Update init.pp remove duplicate declaration of home_dir --- manifests/init.pp | 2 -- 1 file changed, 2 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 51911882..9bdebe15 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -158,8 +158,6 @@ Array $pipelines = [], Boolean $manage_repo = true, ) { - $home_dir = '/usr/share/logstash' - if ! ($ensure in ['present', 'absent']) { fail("\"${ensure}\" is not a valid ensure parameter value") }