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

Parameterize Logstash home directory #324

Merged
merged 1 commit into from
Jan 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@
fail("\"${status}\" is not a valid status parameter value")
}

$home_dir = '/usr/share/logstash'

if ($manage_repo == true) {
validate_string($repo_version)
include logstash::repo
Expand Down
2 changes: 1 addition & 1 deletion manifests/plugin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
)
{
require logstash::package
$exe = '/usr/share/logstash/bin/logstash-plugin'
$exe = "${logstash::home_dir}/bin/logstash-plugin"

case $source { # Where should we get the plugin from?
undef: {
Expand Down
4 changes: 2 additions & 2 deletions manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

$default_startup_options = {
'JAVACMD' => '/usr/bin/java',
'LS_HOME' => '/usr/share/logstash',
'LS_HOME' => $logstash::home_dir,
'LS_SETTINGS_DIR' => $logstash::config_dir,
'LS_OPTS' => "--path.settings=${logstash::config_dir}",
'LS_JAVA_OPTS' => '""',
Expand Down Expand Up @@ -90,7 +90,7 @@
# Invoke 'system-install', which generates startup scripts based on the
# contents of the 'startup.options' file.
exec { 'logstash-system-install':
command => '/usr/share/logstash/bin/system-install',
command => "${logstash::home_dir}/bin/system-install",
refreshonly => true,
notify => Service['logstash'],
}
Expand Down