2014-09-02 14:56:27 +02:00
|
|
|
# Class: icinga2
|
|
|
|
#
|
|
|
|
# This class installs Icinga 2.
|
|
|
|
#
|
|
|
|
# Requires:
|
|
|
|
#
|
|
|
|
# icinga_packages
|
|
|
|
# icinga2::feature
|
|
|
|
#
|
|
|
|
# Sample Usage:
|
|
|
|
#
|
|
|
|
# include icinga2
|
|
|
|
#
|
2014-08-22 13:37:27 +02:00
|
|
|
class icinga2 {
|
2014-09-02 12:11:36 +02:00
|
|
|
include icinga_packages
|
2014-08-28 12:38:52 +02:00
|
|
|
|
2014-09-01 16:27:46 +02:00
|
|
|
package { [
|
2015-07-23 12:39:12 +02:00
|
|
|
'icinga2', 'icinga2-doc'
|
2014-09-15 11:21:03 +02:00
|
|
|
]:
|
2014-09-02 12:21:28 +02:00
|
|
|
ensure => latest,
|
2014-09-02 12:11:36 +02:00
|
|
|
require => Class['icinga_packages'],
|
2014-08-22 13:37:27 +02:00
|
|
|
}
|
2014-09-15 11:21:03 +02:00
|
|
|
-> service { 'icinga2':
|
|
|
|
ensure => running,
|
|
|
|
enable => true,
|
2014-09-15 13:03:52 +02:00
|
|
|
require => User['icinga'],
|
2014-09-15 11:21:03 +02:00
|
|
|
}
|
2014-09-15 13:03:52 +02:00
|
|
|
|
|
|
|
user { 'icinga':
|
2014-09-10 17:02:36 +02:00
|
|
|
ensure => present,
|
|
|
|
}
|
2014-09-15 11:21:03 +02:00
|
|
|
-> file { 'icinga2cfgDir':
|
|
|
|
path => '/etc/icinga2',
|
|
|
|
ensure => directory,
|
|
|
|
links => follow,
|
|
|
|
owner => 'icinga',
|
|
|
|
group => 'icinga',
|
2015-07-23 12:39:12 +02:00
|
|
|
mode => '6750',
|
2014-09-15 11:21:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
icinga2::feature { [ 'statusdata', 'command', 'compatlog' ]: }
|
2014-08-22 13:37:27 +02:00
|
|
|
}
|