Skip to content

Commit

Permalink
Merge pull request #71 from phaedriel/plugins_directory
Browse files Browse the repository at this point in the history
Add optional parameter plugindir (Directory containing kibana plugins)
  • Loading branch information
smortex authored Feb 8, 2023
2 parents 658e842 + 8c507c2 commit 34bf695
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,13 @@
group => $kibana::kibana_group,
mode => '0660',
}

if $kibana::plugindir {
file { $kibana::plugindir:
ensure => 'directory',
owner => $kibana::kibana_user,
group => $kibana::kibana_group,
mode => '0755',
}
}
}
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
# @param status Service status
# @param service_name Service name
# @param package_name Package name
# @param plugindir
# Directory containing kibana plugins.
# Use this setting if you want to manage the directory
# @param kibana_user owner of kibana.yml
# @param kibana_group group of kibana.yml
#
Expand All @@ -36,6 +39,7 @@
Boolean $oss,
Optional[String] $package_source,
Kibana::Status $status,
Optional[Stdlib::Absolutepath] $plugindir = undef,
String[1] $service_name = 'kibana',
String[1] $package_name = 'kibana',
String[1] $kibana_user = 'kibana',
Expand Down
6 changes: 6 additions & 0 deletions spec/classes/kibana_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@
with_name('kibana-custom')
}
end

describe 'kibana_plugindir' do
let(:params) { { plugindir: '/usr/local/kibana/plugins' } }

it { is_expected.to contain_file('/usr/local/kibana/plugins').with(mode: '0755') }
end
end
end
end
Expand Down

0 comments on commit 34bf695

Please sign in to comment.