Module 'icinga2': add documentation

refs #6842
This commit is contained in:
Alexander Klimov 2014-09-02 14:56:27 +02:00
parent d602f82db8
commit 2de3af2505
3 changed files with 51 additions and 4 deletions

View File

@ -1,3 +1,25 @@
# Define: icinga2::config
#
# Provide Icinga 2 configuration file
#
# Parameters:
#
# [*source*] - where to take the file from
#
# Requires:
#
# icinga2
#
# Sample Usage:
#
# icinga2::config { 'constants';
# source => 'puppet:///modules/icinga2_dev',
# }
#
# Provide configuration file '/etc/icinga2/constants.conf'
# from 'puppet:///modules/icinga2_dev/etc/icinga2/constants.conf'
# ('/path/to/puppet/modules/icinga2_dev/files/etc/icinga2/constants.conf')
#
define icinga2::config ($source) {
include icinga2

View File

@ -1,10 +1,22 @@
define icinga2::feature ($feature = $title) {
# Define: icinga2::feature
#
# Enable Icinga 2 feature
#
# Requires:
#
# icinga2
#
# Sample Usage:
#
# icinga2::feature { 'example-feature'; }
#
define icinga2::feature {
include icinga2
exec { "icinga2-feature-${feature}":
exec { "icinga2-feature-${name}":
path => '/bin:/usr/bin:/sbin:/usr/sbin',
unless => "readlink /etc/icinga2/features-enabled/${feature}.conf",
command => "icinga2-enable-feature ${feature}",
unless => "readlink /etc/icinga2/features-enabled/${name}.conf",
command => "icinga2-enable-feature ${name}",
require => Package['icinga2'],
notify => Service['icinga2']
}

View File

@ -1,3 +1,16 @@
# Class: icinga2
#
# This class installs Icinga 2.
#
# Requires:
#
# icinga_packages
# icinga2::feature
#
# Sample Usage:
#
# include icinga2
#
class icinga2 {
include icinga_packages