Defined Type: rundeck::config::plugin

Defined in:
manifests/config/plugin.pp

Summary

This define will install a rundeck plugin.

Overview

Examples:

Basic usage.

rundeck::config::plugin { 'rundeck-hipchat-plugin-1.0.0.jar':
  source => 'http://search.maven.org/remotecontent?filepath=com/hbakkum/rundeck/plugins/rundeck-hipchat-plugin/1.0.0/rundeck-hipchat-plugin-1.0.0.jar',
}

Parameters:

  • source (String[1])

    The http source or local path from which to get the plugin.

  • ensure (Enum['present', 'absent']) (defaults to: 'present')

    Set present or absent to add or remove the plugin.

  • owner (String[1]) (defaults to: 'rundeck')

    The user that rundeck is installed as.

  • group (String[1]) (defaults to: 'rundeck')

    The group permission that rundeck is installed as.

  • plugins_dir (Stdlib::Absolutepath) (defaults to: '/var/lib/rundeck/libext')

    Directory where plugins will be installed.

  • proxy_server (Optional[Stdlib::HTTPUrl]) (defaults to: undef)

    Get the plugin trough a proxy server.



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'manifests/config/plugin.pp', line 21

define rundeck::config::plugin (
  String[1] $source,
  Enum['present', 'absent'] $ensure = 'present',
  String[1] $owner = 'rundeck',
  String[1] $group = 'rundeck',
  Stdlib::Absolutepath $plugins_dir = '/var/lib/rundeck/libext',
  Optional[Stdlib::HTTPUrl] $proxy_server = undef,
) {
  ensure_resource('file', $plugins_dir, { 'ensure' => 'directory', 'owner' => $owner, 'group' => $group, 'mode' => '0755' })

  if $ensure == 'present' {
    archive { "download plugin ${name}":
      ensure       => present,
      source       => $source,
      path         => "${plugins_dir}/${name}",
      proxy_server => $proxy_server,
      before       => File["${plugins_dir}/${name}"],
    }
  }

  file { "${plugins_dir}/${name}":
    ensure => $ensure,
    owner  => $owner,
    group  => $group,
    mode   => '0644',
  }
}