Puppet Class: icingaweb2::module::pdfexport

Defined in:
manifests/module/pdfexport.pp

Summary

Installs, configures and enables the pdfexport 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::pdfexport':
  git_revision  => 'v0.10.0',
  chrome_binary => '/usr/bin/chromium-browser',
}

Parameters:

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

    Enable or disable module.

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

    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.1.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`.

  • chrome_binary (Optional[Stdlib::Absolutepath]) (defaults to: undef)

    Path of the chrome or Chrome/Chromium binary.

  • force_temp_storage (Optional[Boolean]) (defaults to: undef)

    Force using of local temp storage.

  • remote_host (Optional[Stdlib::Host]) (defaults to: undef)

    Connect a remote running Chrome/Chromium.

  • remote_port (Optional[Stdlib::Port]) (defaults to: undef)

    Port to connect the remote running Chrome/Chromium.



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
76
77
78
# File 'manifests/module/pdfexport.pp', line 42

class icingaweb2::module::pdfexport (
  Enum['absent', 'present']      $ensure,
  Stdlib::HTTPUrl                $git_repository,
  String[1]                      $package_name,
  Enum['git', 'none', 'package'] $install_method,
  Stdlib::Absolutepath           $module_dir         = "${icingaweb2::globals::default_module_path}/pdfexport",
  Optional[String[1]]            $git_revision       = undef,
  Optional[Stdlib::Absolutepath] $chrome_binary      = undef,
  Optional[Boolean]              $force_temp_storage = undef,
  Optional[Stdlib::Host]         $remote_host        = undef,
  Optional[Stdlib::Port]         $remote_port        = undef,
) {
  require icingaweb2

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

  icingaweb2::module { 'pdfexport':
    ensure         => $ensure,
    git_repository => $git_repository,
    git_revision   => $git_revision,
    install_method => $install_method,
    module_dir     => $module_dir,
    package_name   => $package_name,
    settings       => {
      'module-pdfexport-chrome' => {
        section_name => 'chrome',
        target       => "${module_conf_dir}/config.ini",
        settings     => delete_undef_values({
            'binary'             => $chrome_binary,
            'force_temp_storage' => $force_temp_storage,
            'host'               => $remote_host,
            'port'               => $remote_port,
        }),
      },
    },
  }
}