Defined Type: sentry::plugin
- Defined in:
- manifests/plugin.pp
Overview
Define: sentry::plugin
This define installs a sentry plugin.
Parameters
- plugin
-
The plugin to install.
- version
-
The plugin version to install.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'manifests/plugin.pp', line 13
define sentry::plugin(
$plugin = $title,
$version = undef,
) {
include sentry
validate_string($plugin)
validate_string($version)
if $version {
$pip_install_args = "-U ${plugin}==${version}"
$pip_freeze_spec = "${plugin}==${version}"
} else {
$pip_install_args = "-U ${plugin}"
$pip_freeze_spec = $plugin
}
exec { "sentry_plugin_${plugin}":
command => "${sentry::install::pip_command} install ${pip_install_args}",
unless => "${sentry::install::pip_command} freeze | /bin/grep '${pip_freeze_spec}'",
user => $sentry::owner,
cwd => $sentry::path,
timeout => $sentry::timeout,
}
}
|