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



12
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'manifests/rundeck.pp', line 12

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

  $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,
    }
  }

}