Puppet Class: icinga2::install

Defined in:
manifests/install.pp

Overview

== Class: icinga2::install

This class handles the installation of the Icinga 2 package. On Windows only chocolatey is supported as installation source.

=== Parameters

This class does not provide any parameters.

=== Examples

This class is private and should not be called by others than this module.



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
# File 'manifests/install.pp', line 15

class icinga2::install {

  assert_private()

  $package_name   = $::icinga2::globals::package_name
  $manage_package = $::icinga2::manage_package
  $cert_dir       = $::icinga2::globals::cert_dir
  $conf_dir       = $::icinga2::globals::conf_dir
  $user           = $::icinga2::globals::user
  $group          = $::icinga2::globals::group

  if $manage_package {
    if $::osfamily == 'windows' { Package { provider => chocolatey, } }

    package { $package_name:
      ensure => installed,
      before => File[$cert_dir, $conf_dir],
    }
  }

  file { [$cert_dir, $conf_dir]:
    ensure => directory,
    owner  => $user,
    group  => $group,
  }

}