Puppet Class: icingaweb2::module::generictts

Defined in:
manifests/module/generictts.pp

Summary

Installs and enables the generictts module.

Overview

Note:

If you want to use ‘git` as `install_method`, the CLI `git` command has to be installed. You can manage it yourself as package resource or declare the package name in icingaweb2 class parameter `extra_packages`.

Examples:

class { 'icingaweb2::module::generictts':
  git_revision  => 'v2.0.0',
  ticketsystems => {
    'my-ticket-system' => {
      pattern => '/#([0-9]{4,6})/',
      url     => 'https://my.ticket.system/tickets/id=$1',
    },
  },
}

Parameters:

  • ensure (Enum['absent', 'present'])

    Enable or disable module.

  • module_dir (Stdlib::Absolutepath) (defaults to: "${icingaweb2::globals::default_module_path}/generictts")

    Target directory of the module.

  • git_repository (Stdlib::HTTPUrl)

    Set a git repository URL.

  • git_revision (Optional[String[1]]) (defaults to: undef)

    Set either a branch or a tag name, eg. ‘master` or `v2.0.0`.

  • install_method (Enum['git', 'none', 'package'])

    Install methods are ‘git`, `package` and `none` is supported as installation method.

  • package_name (String[1])

    Package name of the module. This setting is only valid in combination with the installation method ‘package`.

  • ticketsystems (Hash)

    A hash of ticketsystems. The hash expects a ‘patten` and a `url` for each ticketsystem. The regex pattern is to match the ticket ID, eg. `/#([0-9]4,6)/`. Place the ticket ID in the URL, eg. `my.ticket.system/tickets/id=$1`.



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'manifests/module/generictts.pp', line 40

class icingaweb2::module::generictts (
  Enum['absent', 'present']      $ensure,
  Stdlib::HTTPUrl                $git_repository,
  Enum['git', 'none', 'package'] $install_method,
  String[1]                      $package_name,
  Hash                           $ticketsystems,
  Stdlib::Absolutepath           $module_dir   = "${icingaweb2::globals::default_module_path}/generictts",
  Optional[String[1]]            $git_revision = undef,
) {
  require icingaweb2

  $module_conf_dir = "${icingaweb2::globals::conf_dir}/modules/generictts"

  icingaweb2::module { 'generictts':
    ensure         => $ensure,
    git_repository => $git_repository,
    git_revision   => $git_revision,
    install_method => $install_method,
    module_dir     => $module_dir,
    package_name   => $package_name,
  }

  create_resources('icingaweb2::module::generictts::ticketsystem', $ticketsystems)
}