Puppet Class: psick::rundeck

Defined in:
manifests/rundeck.pp

Overview

This class manages the installation and initialisation of rundeck

Parameters:

  • ensure (String) (defaults to: 'present')

    If to install or remove rundeck

  • auto_prereq (Boolean) (defaults to: $::psick::auto_prereq)

    If to automatically install all the prerequisites resources needed to install rundeck, if defined in tinydata

  • template (Optional[String]) (defaults to: undef)

    The path to the erb template (as used in template()) to use to populate the main configuration file.

  • init_template (Optional[String]) (defaults to: undef)

    The path to the erb template (as used in template()) to use to populate the init script configuration file

  • options (Hash) (defaults to: { })

    An open hash of options you may use in your template

  • manage (Boolean) (defaults to: $::psick::manage)

    If to actually manage any resource in this class. If false no resource is managed. Default value is taken from main psick class.

  • noop_manage (Boolean) (defaults to: $::psick::noop_manage)

    If to use the noop() function for all the resources provided by this class. If this is true the noop function is called with $noop_value argument. This overrides any other noop setting (either set on client’s puppet.conf or by noop() function in main psick class). Default from psick class.

  • noop_value (Boolean) (defaults to: $::psick::noop_value)

    The value to pass to noop() function if noop_manage is true. It applies to all the resources (and classes) declared in this class If true: noop metaparamenter is set to true, resources are not applied If false: noop metaparameter is set to false, and any eventual noop setting is overridden: resources are always applied. Default from psick class.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'manifests/rundeck.pp', line 25

class psick::rundeck (
  String           $ensure        = 'present',
  Boolean          $auto_prereq   = $::psick::auto_prereq,
  Optional[String] $template      = undef,
  Optional[String] $init_template = undef,
  Hash             $options       = { },

  Boolean          $manage        = $::psick::manage,
  Boolean          $noop_manage   = $::psick::noop_manage,
  Boolean          $noop_value    = $::psick::noop_value,
) {

  if $manage {
    if $noop_manage {
      noop($noop_value)
    }

    $options_default = {
      'framework.server.name'     => $::fqdn,
      'framework.server.hostname' => $::fqdn,
      'framework.server.port'     => '4440',
      'framework.server.url'      => "http://${::fqdn}:4440",
      'framework.ssh.keypath'     => '/var/lib/rundeck/.ssh/id_rsa',
      'framework.ssh.user'        => 'rundeck',
      'framework.ssh.timeout'     => '0',
    }
    $real_options = $options_default + $options

    ::tp::install { 'rundeck' :
      ensure      => $ensure,
      auto_prereq => $auto_prereq,
    }

    if $template {
      ::tp::conf { 'rundeck':
        ensure       => $ensure,
        template     => $template,
        base_file    => 'config',
        options_hash => $real_options,
      }
    }
    if $init_template {
      ::tp::conf { 'rundeck::init':
        ensure       => $ensure,
        template     => $init_template,
        base_file    => 'init',
        options_hash => $real_options,
      }
    }
  }
}