Defined Type: graphdb::plugin

Defined in:
manifests/plugin.pp

Overview

Define: graphdb::plugin

This define allows you to install GraphDB plugin from given source

Parameters

ensure

String. Controls if the managed resources shall be present or absent. If set to absent:

  • The managed plugin is being uninstalled.

  • Any traces of installation will be purged as good as possible. This may include existing configuration files. The exact behavior is provider dependent. Q.v.:

  • System modifications (if any) will be reverted as good as possible (e.g. removal of created users, services, changed log settings, …).

  • This is thus destructive and should be used with care.

Defaults to present.

instance

GraphDB instance to install plugin on.

source

The source of GraphDB plugin.

Parameters:

  • instance (Any)
  • ensure (Any) (defaults to: $graphdb::ensure)
  • source (Any) (defaults to: undef)


27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'manifests/plugin.pp', line 27

define graphdb::plugin (
  $instance,
  $ensure = $graphdb::ensure,
  $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 ${title} && unzip ${instance_plugins_dir}/${plugin_file_name} -d ${instance_plugins_dir}",
    refreshonly => true,
    require     => Package['unzip'],
    notify      => Service["graphdb-${instance}"],
  }

}