Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New parameter for home directory #368

Merged
merged 13 commits into from
Jul 20, 2022
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ class { 'logstash':
}
```

### Use a different logstash home
``` puppet
class { 'logstash':
home_dir => '/opt/logstash',
}
```

### Do not run as a service
``` puppet
class { 'logstash':
Expand Down
14 changes: 11 additions & 3 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
# @param [Integer] download_timeout
# Timeout, in seconds, for http, https, and ftp downloads.
#
# @param [String] home_dir
joernott marked this conversation as resolved.
Show resolved Hide resolved
# The home directory for logstash.
#
# @param [String] logstash_user
# The user that Logstash should run as. This also controls file ownership.
#
Expand Down Expand Up @@ -143,6 +146,7 @@
$package_url = undef,
$package_name = 'logstash',
Integer $download_timeout = 600,
$home_dir = '/usr/share/logstash',
joernott marked this conversation as resolved.
Show resolved Hide resolved
$logstash_user = 'logstash',
$logstash_group = 'logstash',
$config_dir = '/etc/logstash',
Expand All @@ -167,7 +171,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']
joernott marked this conversation as resolved.
Show resolved Hide resolved
}