Skip to content

Commit

Permalink
New parameter for home directory
Browse files Browse the repository at this point in the history
  • Loading branch information
joernott authored Jul 20, 2022
1 parent a293c27 commit 5c72041
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
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

0 comments on commit 5c72041

Please sign in to comment.