mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 00:34:03 +02:00
parent
d602f82db8
commit
2de3af2505
@ -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) {
|
define icinga2::config ($source) {
|
||||||
include icinga2
|
include icinga2
|
||||||
|
|
||||||
|
@ -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
|
include icinga2
|
||||||
|
|
||||||
exec { "icinga2-feature-${feature}":
|
exec { "icinga2-feature-${name}":
|
||||||
path => '/bin:/usr/bin:/sbin:/usr/sbin',
|
path => '/bin:/usr/bin:/sbin:/usr/sbin',
|
||||||
unless => "readlink /etc/icinga2/features-enabled/${feature}.conf",
|
unless => "readlink /etc/icinga2/features-enabled/${name}.conf",
|
||||||
command => "icinga2-enable-feature ${feature}",
|
command => "icinga2-enable-feature ${name}",
|
||||||
require => Package['icinga2'],
|
require => Package['icinga2'],
|
||||||
notify => Service['icinga2']
|
notify => Service['icinga2']
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,16 @@
|
|||||||
|
# Class: icinga2
|
||||||
|
#
|
||||||
|
# This class installs Icinga 2.
|
||||||
|
#
|
||||||
|
# Requires:
|
||||||
|
#
|
||||||
|
# icinga_packages
|
||||||
|
# icinga2::feature
|
||||||
|
#
|
||||||
|
# Sample Usage:
|
||||||
|
#
|
||||||
|
# include icinga2
|
||||||
|
#
|
||||||
class icinga2 {
|
class icinga2 {
|
||||||
include icinga_packages
|
include icinga_packages
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user