Puppet Class: icingaweb2::module::fileshipper

Defined in:
manifests/module/fileshipper.pp

Overview

@example: class { 'icingaweb2::module::fileshipper': git_revision => 'v1.0.1', base_directories => { temp => '/var/lib/fileshipper' }, directories => { 'test' => { 'source' => '/var/lib/fileshipper/source', 'target' => '/var/lib/fileshipper/target', } } }

Parameters:

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

    Enables or disables module.

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

    Target directory of the module.

  • git_repository (String) (defaults to: 'https://github.com/Icinga/icingaweb2-module-fileshipper.git')

    Set a git repository URL.

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

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

  • package_name (String) (defaults to: 'icingaweb2-module-fileshipper')

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

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

    Set either a branch or a tag name, eg. master or v1.3.2.

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

    Hash of base directories. These directories can later be selected in the import source (Director).

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

    Deploy plain Icinga 2 configuration files through the Director to your Icinga 2 master.



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
79
80
81
82
83
84
85
86
87
88
# File 'manifests/module/fileshipper.pp', line 48

class icingaweb2::module::fileshipper(
  Enum['absent', 'present']      $ensure           = 'present',
  Optional[Stdlib::Absolutepath] $module_dir       = undef,
  String                         $git_repository   = 'https://github.com/Icinga/icingaweb2-module-fileshipper.git',
  Optional[String]               $git_revision     = undef,
  Enum['git', 'none', 'package'] $install_method   = 'git',
  String                         $package_name     = 'icingaweb2-module-fileshipper',
  Hash                           $base_directories = {},
  Hash                           $directories      = {},
){

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

  if $base_directories {
    $base_directories.each |$identifier, $directory| {
      icingaweb2::module::fileshipper::basedir{$identifier:
        basedir => $directory,
      }
    }
  }

  if $directories {
    $directories.each |$identifier, $settings| {
      icingaweb2::module::fileshipper::directory{$identifier:
        source     => $settings['source'],
        target     => $settings['target'],
        extensions => $settings['extensions'],
      }
    }
  }

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