Defined Type: graphdb::plugin
- Defined in:
-
manifests/plugin.pp
Summary
This define allows you to install GraphDB plugin from given source
Overview
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'manifests/plugin.pp', line 23
define graphdb::plugin (
String $instance,
Graphdb::Ensure $ensure = $graphdb::ensure,
Optional[String] $source = undef,
) {
require graphdb
$instance_plugins_dir = "${graphdb::data_dir}/${instance}/plugins"
$plugin_file_name = basename($source)
file { "${instance_plugins_dir}/${plugin_file_name}":
ensure => $ensure,
source => $source,
}
~> exec { "unpack-graphdb-plugin-${title}":
command => "rm -rf ${instance_plugins_dir}/${title} && \
unzip ${instance_plugins_dir}/${plugin_file_name} -d ${instance_plugins_dir} && \
chown -R ${graphdb::graphdb_user}:${graphdb::graphdb_group} ${instance_plugins_dir}/${title}",
refreshonly => true,
require => Package['unzip'],
notify => Service["graphdb-${instance}"],
}
}
|