Skip to content

Commit

Permalink
Add a parameter to override the plugin install user
Browse files Browse the repository at this point in the history
  • Loading branch information
thebeanogamer authored Aug 17, 2022
1 parent 4590501 commit bc91a5d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion manifests/plugin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,23 @@
#
# @param source [String] Install from this file, not from RubyGems.
#
# @param user User to install plugin as.
#
# @param environment [String] Environment used when running 'logstash-plugin'
#
define logstash::plugin (
$source = undef,
$ensure = present,
$environment = [],
String $user = $logstash::logstash_user,
) {
require logstash::package
$exe = "${logstash::home_dir}/bin/logstash-plugin"

Exec {
path => '/bin:/usr/bin',
cwd => '/tmp',
user => $logstash::logstash_user,
user => $user,
timeout => 1800,
environment => $environment,
}
Expand Down

0 comments on commit bc91a5d

Please sign in to comment.