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
6 changes: 4 additions & 2 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 home_dir
# 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,
Stdlib::Absolutepath $home_dir = '/usr/share/logstash',
$logstash_user = 'logstash',
$logstash_group = 'logstash',
$config_dir = '/etc/logstash',
Expand All @@ -154,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")
}
Expand Down